It seems that jest-addon is not getting any jest-test-results, resulting in message: This story has tests configured, but no file was found
You can find the same message here https://storybooks-official.netlify.com/?selectedKind=Addons%7Cjest&selectedStory=withTests&full=0&addons=1&stories=1&panelRight=0&addonPanel=storybook%2Ftests%2Fpanel
It might be related to this issue https://github.com/storybooks/storybook/issues/4453
Looks appeared after #3983.
I ran into this issue today. a working config for the withTests function looks like this currently:
import jestResults from '../jest-test-results.json';
withTests({
filesExt: { filesExt: ".spec.js" },
results: jestResults
})
filesExt doesn't look to support regex either.
@aschlick do you think you could help us get the addon-jest into a better shape?
Sure! Hopefully I'll get a pull request together within a week or so.
Workaround similar to above worked for me, currently the addon is concatting the string in findTestResults there's no regex involved just a String.includes check.
addDecorator(
withTests({
results,
filesExt: ".test.tsx", // tsx in my case!
}),
);
Most helpful comment
Workaround similar to above worked for me, currently the addon is concatting the string in
findTestResultsthere's no regex involved just aString.includescheck.