Skip to content

Commit dc031f6

Browse files
committed
test: no-wait-for-multiple-assertions
1 parent 114f61c commit dc031f6

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

tests/lib/rules/no-wait-for-multiple-assertions.test.ts

+24
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,17 @@ ruleTester.run(RULE_NAME, rule, {
4040
})
4141
`,
4242
},
43+
{
44+
settings: { 'testing-library/utils-module': 'test-utils' },
45+
code: `// Aggressive Reporting disabled - waitFor renamed
46+
import { waitFor as renamedWaitFor } from '@marko/testing-library'
47+
import { waitFor } from 'somewhere-else'
48+
await waitFor(() => {
49+
expect(a).toEqual('a')
50+
expect(b).toEqual('b')
51+
})
52+
`,
53+
},
4354
// this needs to be check by other rule
4455
{
4556
code: `
@@ -116,6 +127,19 @@ ruleTester.run(RULE_NAME, rule, {
116127
{ line: 5, column: 11, messageId: 'noWaitForMultipleAssertion' },
117128
],
118129
},
130+
{
131+
settings: { 'testing-library/utils-module': 'test-utils' },
132+
code: `// Aggressive Reporting disabled
133+
import { waitFor } from '@marko/testing-library'
134+
await waitFor(() => {
135+
expect(a).toEqual('a')
136+
expect(b).toEqual('b')
137+
})
138+
`,
139+
errors: [
140+
{ line: 5, column: 11, messageId: 'noWaitForMultipleAssertion' },
141+
],
142+
},
119143
{
120144
settings: { 'testing-library/utils-module': 'test-utils' },
121145
code: `// Aggressive Reporting disabled

0 commit comments

Comments
 (0)