Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix extra args not being passed to jest #322

Merged
merged 4 commits into from
Jul 14, 2023

Conversation

zyulyaev
Copy link
Contributor

@zyulyaev zyulyaev commented Jun 22, 2023

Describe the bug
When you try to run npx test-storybook TestName in order to run tests on a specific file - you get the following error:

TypeError: rawArgv2.replace is not a function
    at <anonymous> (node_modules/@storybook/test-runner/node_modules/jest-cli/build/cli/index.js:188:40)
    at Array.map (<anonymous>)
    at buildArgv (node_modules/@storybook/test-runner/node_modules/jest-cli/build/cli/index.js:188:17)
    at Object.run (node_modules/@storybook/test-runner/node_modules/jest-cli/build/cli/index.js:147:18)
    at async executeJestPlaywright (node_modules/@storybook/test-runner/dist/test-storybook.js:128:3)
    at async main (node_modules/@storybook/test-runner/dist/test-storybook.js:272:3)

Expected behavior
Specified test file is executed.

Version

Published prerelease version: v0.11.1-next.1

Changelog

🐛 Bug Fix

Authors: 4

@jacobleetodd
Copy link

Could someone pretty please take a look at this PR? Right now the only way I know to update the coverage report is to run all of the Storybook tests. This can be very time consuming. Thanks!

@yannbf yannbf added the patch Increment the patch version when merged label Jul 14, 2023
@codecov
Copy link

codecov bot commented Jul 14, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +1.87 🎉

Comparison is base (2aa338d) 75.30% compared to head (051dea3) 77.17%.

Additional details and impacted files
@@            Coverage Diff             @@
##             next     #322      +/-   ##
==========================================
+ Coverage   75.30%   77.17%   +1.87%     
==========================================
  Files           8       11       +3     
  Lines         166      184      +18     
  Branches       35       39       +4     
==========================================
+ Hits          125      142      +17     
- Misses         41       42       +1     
Impacted Files Coverage Δ
src/util/getCliOptions.ts 65.00% <100.00%> (+5.00%) ⬆️

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@yannbf
Copy link
Member

yannbf commented Jul 14, 2023

Hey @zyulyaev thank you so so much for your contribution! <3

@yannbf yannbf merged commit e3406ed into storybookjs:next Jul 14, 2023
@jacobleetodd
Copy link

@yannbf and @zyulyaev thank you!!! This is working great :)

@IanVS
Copy link
Member

IanVS commented Jul 26, 2023

Hi there, just curious, why did this go to "next" as a pre-release rather than being released as a bugfix in a version 0.11.1?

@yannbf yannbf mentioned this pull request Jul 27, 2023
@github-actions
Copy link

🚀 PR was released in v0.12.0 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants