test-runner icon indicating copy to clipboard operation
test-runner copied to clipboard

[Bug] Sync issue in failures from one test affecting another test

Open yannbf opened this issue 3 years ago • 0 comments

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:

image

Steps to reproduce the behavior

  1. Change the Demo story in Button.stories.js from:
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>
);
  1. 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: image

yannbf avatar Feb 23 '22 14:02 yannbf