Skip to content

Commit 6fc8e5a

Browse files
committed
Add test each example
1 parent 7a7f3b8 commit 6fc8e5a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

code/core/src/component-testing/components/test-fn.stories.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,3 +175,18 @@ TestNames.test(
175175
'should display an error when login is attempted with an unverified email address',
176176
() => {}
177177
);
178+
179+
export const TestEach = meta.story();
180+
181+
TestEach.each(
182+
'Test Each With %s',
183+
[['One'], ['Two']],
184+
(num) => ({
185+
args: {
186+
children: num,
187+
},
188+
}),
189+
({ canvas }, num) => {
190+
expect(canvas.getByText(num)).toBeInTheDocument();
191+
}
192+
);

0 commit comments

Comments
 (0)