diff --git a/src/rules/__tests__/unbound-method.test.ts b/src/rules/__tests__/unbound-method.test.ts index 2478774b3..a425f721a 100644 --- a/src/rules/__tests__/unbound-method.test.ts +++ b/src/rules/__tests__/unbound-method.test.ts @@ -37,7 +37,6 @@ const toThrowMatchers = [ const validTestCases: string[] = [ ...[ - 'expect(Console.prototype.log)', 'expect(Console.prototype.log).toHaveBeenCalledTimes(1);', 'expect(Console.prototype.log).not.toHaveBeenCalled();', 'expect(Console.prototype.log).toStrictEqual(somethingElse);', @@ -55,6 +54,19 @@ const validTestCases: string[] = [ ]; const invalidTestCases: Array> = [ + { + code: dedent` + ${ConsoleClassAndVariableCode} + + expect(Console.prototype.log) + `, + errors: [ + { + line: 9, + messageId: 'unbound', + }, + ], + }, { code: 'expect(Console.prototype.log).toHaveBeenCalledTimes', errors: [