Open button.stories.svelte, import @storybook/testing-library and add a test to the play function e.g.: play={ (args) => expect(true).toBe(true) }
$npm run storybook
$./node_modules/.bin/test-storybook
Expected behavior
Tests are expected to be found and run.
Screenshots and/or logs
No tests found, exiting with code 1
Run with `--passWithNoTests` to exit with code 0
In /Users/home/Work/svelte_components
30 files checked.
testMatch: /Users/home/Work/svelte_components/src/**/*.mdx, /Users/home/Work/svelte_components/src/**/*.stories.@(js|jsx|ts|ts|svelte|tsx) - 0 matches
testPathIgnorePatterns: /node_modules/ - 30 matches
testRegex: - 0 matches
Pattern: - 0 matches
Environment
OS: OSX 13.1
Node.js version: v16.14.2
NPM version: 8.5.0
Browser (if applicable): Chrome
Browser version (if applicable): 108.0.5359.124
Device (if applicable): Mac
Additional context
I haven't tried this in Storybook 6 but I assume the result is the same. I've also tried to run this in a container with the same effect. If you deploy the Storybook and run test with a url flag the test work. e.g.: ./node_modules/.bin/test-storybook --url example.com. While this works it's not a great solution since test need to be deployed before tests can be run (which is kind of backwards).
Describe the bug
After installing
@storybook/test-runner@0.10.0-next.3
and running it with./node_modules/.bin/test-storybook
it is unable to find any tests.Steps to reproduce the behavior
npm install --save-dev @storybook/test-runner@0.10.0-next.3 @storybook/testing-library
button.stories.svelte
, import@storybook/testing-library
and add a test to the play function e.g.:play={ (args) => expect(true).toBe(true) }
npm run storybook
./node_modules/.bin/test-storybook
Expected behavior
Tests are expected to be found and run.
Screenshots and/or logs
Environment
Additional context
I haven't tried this in Storybook 6 but I assume the result is the same. I've also tried to run this in a container with the same effect. If you deploy the Storybook and run test with a url flag the test work. e.g.:
./node_modules/.bin/test-storybook --url example.com
. While this works it's not a great solution since test need to be deployed before tests can be run (which is kind of backwards).