You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tests do not fail in the terminal when using the --coverage flag because the .nycrc file is not being recognized.
I have an Nx monorepo with a separate app for Storybook. The Storybook configuration and .nycrc configuration file are located in this app.
It works correctly if:
The .nycrc file is in the workspace root.
The current working directory (cwd) is explicitly set to the Storybook app.
However, neither of these approaches fit the desired architecture.
After investigation, it seems that the loadNycConfig function does not receive the .nycrcPath and cwd parameters when creating a report or checking the threshold. These parameters are passed elsewhere but not here.
If you have any questions, please feel free to ask :)
Steps to Reproduce
Create a monorepo.
Create an app with Storybook configuration.
In .storybook/main.ts, add .nycrcPath to the coverage configuration.
Run test-storybook with the --coverage flag.
Expected Behavior
The .nycrc file path should be correctly recognized, and tests should fail if they do not meet the coverage threshold.
Environment
OS: macOS 14.1
Node.js version: 20.1
NPM version: 10.2.3
The text was updated successfully, but these errors were encountered:
Describe the Bug
Tests do not fail in the terminal when using the
--coverage
flag because the.nycrc
file is not being recognized.I have an Nx monorepo with a separate app for Storybook. The Storybook configuration and
.nycrc
configuration file are located in this app.It works correctly if:
.nycrc
file is in the workspace root.However, neither of these approaches fit the desired architecture.
After investigation, it seems that the
loadNycConfig
function does not receive the.nycrcPath
andcwd
parameters when creating a report or checking the threshold. These parameters are passed elsewhere but not here.If you have any questions, please feel free to ask :)
Steps to Reproduce
.storybook/main.ts
, add.nycrcPath
to the coverage configuration.test-storybook
with the--coverage
flag.Expected Behavior
The
.nycrc
file path should be correctly recognized, and tests should fail if they do not meet the coverage threshold.Environment
The text was updated successfully, but these errors were encountered: