-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Failing to load config when doing unit tests with Jest (default config) #5537
Comments
Hi @CrashyBang - any chance you could upload what you have to github? |
Or at least what your |
Hey @tmeasday, Sure here is the
And here is my module.exports = {
moduleFileExtensions: ["js", "jsx", "json", "vue"],
transform: {
"^.+\\.vue$": "vue-jest",
".+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$":
"jest-transform-stub",
"^.+\\.jsx?$": "babel-jest"
},
transformIgnorePatterns: ["/node_modules/(?!(@storybook/.*\\.vue$))"],
moduleNameMapper: {
"^@/(.*)$": "<rootDir>/src/$1"
},
snapshotSerializers: ["jest-serializer-vue"],
testMatch: [
"**/testing/suites/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)"
],
testURL: "http://localhost/"
}; And here is my module.exports = api => {
// No ES6 https://github.com/cypress-io/cypress/issues/2945
const test = {
presets: ["@vue/app"]
};
if (api.env("test")) test.plugins = ["require-context-hook"];
return test;
}; And for your reference the directory structure of
|
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
Still experiencing this issue, have been unable to figure out the cause. |
Tried this in another project using the updated plugins:
I thought it may be related to runnning the project in a Docker container, but even running it locally (tried nuking and re-installing Cheers! |
Hi @CrashyBang -- sorry I didn't see your messages above (?) I think your issue here is you have put your storybook config in a non-standard location ( |
Hey @tmeasday, Yep that sorted it, I had to use Cheers! |
Describe the bug
A clear and concise description of what the bug is.
Storybooks fails fails to load/find
.storybooks
.To Reproduce
Steps to reproduce the behavior:
Create new project with
vue-cli
.Use
vue-cli
plugin to add storybook to a fresh Vue project.Follow instructions in the 'Getting Started' guide on setting up 'Snapshot Testing' (with Storyshots plugin).
Run:
Get:
Expected behavior
A clear and concise description of what you expected to happen.
Tests to run.
Screenshots
If applicable, add screenshots to help explain your problem.
N/A.
Code snippets
If applicable, add code samples to help explain your problem.
N/A.
System:
Additional context
Add any other context about the problem here.
N/A.
The text was updated successfully, but these errors were encountered: