contenta_vue_nuxt icon indicating copy to clipboard operation
contenta_vue_nuxt copied to clipboard

How can test one file only ?

Open davidjor-hpan opened this issue 7 years ago • 2 comments

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 ?

davidjor-hpan avatar Dec 15 '17 06:12 davidjor-hpan

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

yann-yinn avatar Dec 17 '17 16:12 yann-yinn

@davidjor-hpan For a quick way to do this: https://webpack.js.org/guides/dependency-management/#require-context in https://github.com/contentacms/contenta_vue_nuxt/blob/b3224e843c67d55c8a56c01140092a930ff4c5af/test/unit/index.js#L5 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.

alexfinnarn avatar Apr 24 '18 17:04 alexfinnarn