test-runner
test-runner copied to clipboard
[Bug] Sync issue in failures from one test affecting another test
Describe the bug
This seems not to be an actual bug in the test-runner, but rather in Storybook. Here's an example of a diagram that shows the sequence of steps in the test-runner:

Steps to reproduce the behavior
- Change the
Demostory inButton.stories.jsfrom:
export const Demo = (args) => (
<button type="button" onClick={() => args.onSubmit('clicked')}>
Click
</button>
);
to:
export const Demo = (args) => (
<button type="button" onClick={() => { throw new Error('boom') }}>
Click
</button>
);
- Run yarn test-storybook
The boom error should not leak into the FindBy story, which actually does not even use the same component as Demo:
