Skip to content

Commit 64ef899

Browse files
authored
fix: correct fixer for prefer-called-exactly-once-with (#774)
1 parent 83a5f7e commit 64ef899

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/rules/prefer-called-exactly-once-with.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export default createEslintRule<Options, MESSAGE_IDS>({
4848
messageId: 'preferCalledExactlyOnceWith',
4949
node: matcher,
5050
fix: (fixer) => [
51-
fixer.replaceText(matcher, `${matcherName}ExactlyOnceWith`),
51+
fixer.replaceText(matcher, `toHaveBeenCalledExactlyOnceWith`),
5252
],
5353
})
5454
}

tests/prefer-called-exactly-once-with.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ruleTester.run(RULE_NAME, rule, {
1717
line: 1,
1818
},
1919
],
20-
output: 'expect(x).toHaveBeenCalledOnceExactlyOnceWith();',
20+
output: 'expect(x).toHaveBeenCalledExactlyOnceWith();',
2121
},
2222
{
2323
code: 'expect(x).toHaveBeenCalledWith();',
@@ -29,7 +29,7 @@ ruleTester.run(RULE_NAME, rule, {
2929
line: 1,
3030
},
3131
],
32-
output: 'expect(x).toHaveBeenCalledWithExactlyOnceWith();',
32+
output: 'expect(x).toHaveBeenCalledExactlyOnceWith();',
3333
},
3434
],
3535
})

0 commit comments

Comments
 (0)