Skip to content

Commit

Permalink
chore: update (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
veritem authored Aug 21, 2023
1 parent ffe258e commit 17f5853
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
2 changes: 1 addition & 1 deletion src/rules/prefer-called-with.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default createEslintRule<Options, MESSAGE_IDS>({
const { matcher } = vitestFnCall
const matcherName = getAccessorValue(matcher)

if (['toBeCalled', 'toHaveBeenCalled', 'toHaveBeenCalledOnce'].includes(matcherName)) {
if (['toBeCalled', 'toHaveBeenCalled'].includes(matcherName)) {
context.report({
data: { matcherName },
messageId: 'preferCalledWith',
Expand Down
12 changes: 0 additions & 12 deletions tests/prefer-called-with.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,6 @@ describe(RULE_NAME, () => {
}
],
output: 'expect(fn).toHaveBeenCalledWith();'
},
{
code: 'it("some test", () => {expect(mockApi).toHaveBeenCalledOnce();});',
errors: [
{
messageId: 'preferCalledWith',
data: { matcherName: 'toHaveBeenCalledOnce' },
column: 40,
line: 1
}
],
output: 'it("some test", () => {expect(mockApi).toHaveBeenCalledOnceWith();});'
}
]
})
Expand Down

0 comments on commit 17f5853

Please sign in to comment.