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

How can test one file only ? #31

Open
davidjor-hpan opened this issue Dec 15, 2017 · 2 comments
Open

How can test one file only ? #31

davidjor-hpan opened this issue Dec 15, 2017 · 2 comments
Labels

Comments

@davidjor-hpan
Copy link
Contributor

https://github.com/contentacms/contenta_vue_nuxt/blob/b3224e843c67d55c8a56c01140092a930ff4c5af/test/unit/index.js#L7

This is testing all files ! I want to test specific one file only , how can I do that ?

@yann-yinn
Copy link
Contributor

Sorry i have no time for this project for now. Please post the solution here if you find something !
I am currently looking for mainteners

@alexfinnarn
Copy link
Contributor

@davidjor-hpan For a quick way to do this: https://webpack.js.org/guides/dependency-management/#require-context in

var testsContext = require.context('.', true, /\.spec$/)
looks for all of the files in that directory test/unit and finds files that match the /\.spec$/ regular expression. I think you can change the regular expression to match a file you want to run.

Otherwise, Karma has some docs http://karma-runner.github.io/2.0/intro/configuration.html on running tests...not a lot of info that I can see, to be honest, but I also don't know how the Webpack config fits into running the tests.

Please report back if that helps! I will start looking into the tests more as I try to complete some of these tickets.

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

No branches or pull requests

3 participants