Skip to content

Commit c596f96

Browse files
committed
test(unbound-method): adjust test
1 parent 2250013 commit c596f96

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/rules/__tests__/unbound-method.test.ts

+13-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ const toThrowMatchers = [
3737

3838
const validTestCases: string[] = [
3939
...[
40-
'expect(Console.prototype.log)',
4140
'expect(Console.prototype.log).toHaveBeenCalledTimes(1);',
4241
'expect(Console.prototype.log).not.toHaveBeenCalled();',
4342
'expect(Console.prototype.log).toStrictEqual(somethingElse);',
@@ -55,6 +54,19 @@ const validTestCases: string[] = [
5554
];
5655

5756
const invalidTestCases: Array<TSESLint.InvalidTestCase<MessageIds, Options>> = [
57+
{
58+
code: dedent`
59+
${ConsoleClassAndVariableCode}
60+
61+
expect(Console.prototype.log)
62+
`,
63+
errors: [
64+
{
65+
line: 9,
66+
messageId: 'unbound',
67+
},
68+
],
69+
},
5870
{
5971
code: 'expect(Console.prototype.log).toHaveBeenCalledTimes',
6072
errors: [

0 commit comments

Comments
 (0)