Skip to content

Commit 636e730

Browse files
committed
fix: address PR comments
1 parent 387cda2 commit 636e730

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

tests/lib/rules/no-container.test.ts

+18
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,24 @@ ruleTester.run(RULE_NAME, rule, {
139139
},
140140
],
141141
},
142+
{
143+
settings: { 'testing-library/utils-module': 'test-utils' },
144+
code: `
145+
import { render } from '@marko/testing-library'
146+
147+
const setup = () => render(<Example />)
148+
149+
const { container } = setup()
150+
const button = container.querySelector('.btn-primary');
151+
`,
152+
errors: [
153+
{
154+
line: 7,
155+
column: 24,
156+
messageId: 'noContainer',
157+
},
158+
],
159+
},
142160
{
143161
code: `
144162
const { container } = render(<Example />);

tests/lib/rules/no-wait-for-empty-callback.test.ts

+20
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,26 @@ ruleTester.run(RULE_NAME, rule, {
9494
],
9595
} as const)
9696
),
97+
...ALL_WAIT_METHODS.map(
98+
(m) =>
99+
({
100+
settings: { 'testing-library/utils-module': 'test-utils' },
101+
code: `
102+
import { ${m} } from '@marko/testing-library';
103+
${m}(() => {});
104+
`,
105+
errors: [
106+
{
107+
line: 3,
108+
column: 16 + m.length,
109+
messageId: 'noWaitForEmptyCallback',
110+
data: {
111+
methodName: m,
112+
},
113+
},
114+
],
115+
} as const)
116+
),
97117
...ALL_WAIT_METHODS.map(
98118
(m) =>
99119
({

0 commit comments

Comments
 (0)