Fixing issue where upon completion of async Mocha tests the specifications panel re-renders with new results regardless of the current story in Storybook #52
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request aims to finish what was started in #47 by fixing a bug where the specifications panel always renders the results of the last component with asynchronous mocha tests on the initial load of a Storybook instance.
Let's say you have three components with stories and tests - A, B, and C. And let's say that component B has an asynchronous test. The current behavior is such that if you open a new tab in your web browser and initially land on either component A or component C, the test results of component B will show up in the specifications panel.
This bug exists because the specifications panel re-renders regardless of the current story in Storybook upon the completion of an asynchronous test.
Please let me know your thoughts on my proposed solution. Thank you!