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

What is the purpose of jest-loader.js in folder test/loaders? #53

Closed
paulvanbladel opened this issue Feb 28, 2019 · 5 comments
Closed

Comments

@paulvanbladel
Copy link

Just added jest to a V1 project.
what isjest-loader.js doing?

@paulvanbladel
Copy link
Author

I'm asking because I try to add test references to the wallaby.js file:

    tests: ['test/**/*.spec.js', 'src/**/*.spec.js'],

So, tests which are in the src folder rather than only the test folder.
Now what happens is that jest picks up these tests, but wallaby not.

@nothingismagick
Copy link
Contributor

nothingismagick commented Feb 28, 2019 via email

@nklayman
Copy link
Contributor

You should be able to run the dev sever while you run wallaby, and it will pick up on the sfc tests

@paulvanbladel
Copy link
Author

@nklayman . Not sure what you mean.
I'm in the habit of keeping source files and unit tests together in the src directory, so no separate test directory for unit tests because a unit test always belongs to one file.
So I have my-source-file.js or my-component.vue and my-source-file.spec.js or my-component.spec.js.
Is this a good idea given the fact the apparantly bitcopies are generated relatively in __tests__folder?

@paulvanbladel
Copy link
Author

@nklayman ok, i got it working with wallaby.
I created a sample here: https://github.com/paulvanbladel/quasar-jest-unit-testing-sample
thanks for the support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants