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

jest-addon is not getting any jest-test-results #4497

Closed
VladimirPittner opened this issue Oct 19, 2018 · 5 comments
Closed

jest-addon is not getting any jest-test-results #4497

VladimirPittner opened this issue Oct 19, 2018 · 5 comments

Comments

@VladimirPittner
Copy link

Bug or support request summary

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

Steps to reproduce

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

Please specify which version of Storybook and optionally any affected addons that you're running

  • @storybook/react 4.0.0-rc.1
  • @storybook/addon-something 4.0.0-rc.1

Where to start

It might be related to this issue #4453

@igor-dv igor-dv added this to the v4.0.0 milestone Oct 19, 2018
@igor-dv
Copy link
Member

igor-dv commented Oct 19, 2018

Looks appeared after #3983.

@aschlick
Copy link

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.

@ndelangen
Copy link
Member

@aschlick do you think you could help us get the addon-jest into a better shape?

@aschlick
Copy link

Sure! Hopefully I'll get a pull request together within a week or so.

@lemcii
Copy link

lemcii commented Oct 25, 2018

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!
    }),
);

@ndelangen ndelangen modified the milestones: v4.0.0, next Oct 29, 2018
@igor-dv igor-dv closed this as completed Nov 6, 2018
@issue-sh issue-sh bot removed the merged label Nov 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants