Closed wolendranh closed 3 years ago
Normally you'd use whatever test framework you're using to signal you only want to run a specific test - what one are you using? I.e. Jest (I know it's not usable with this but it's the first one that came to mind), you use it.only
instead of it
to only run the one test.
I am using mocha
with karma and karma-webpack
. Was curious if that's possible to specify something like:
karma start karma.conf.js --test=testname
if you want to execute only a single file it could be something like this... e.g. you will need to have it specific in your karma.config https://open-wc.org/testing/testing-karma.html#testing-single-files-or-folders
if it's really just a single specific test then maybe something like this https://stackoverflow.com/questions/29150998/karma-running-a-single-test-file-from-command-line
I thought there must be a cli flag that karma exposed because intellij is able to run a single test. Turns out it actually builds a new karma configuration on the fly limiting the test files and merges it with your own configuration :exploding_head: . I know most test frameworks also have an option to specify it.only
or describe.only
to limit the test scope. Since this is outside the scope of karma-webpack and some examples have been posted, I'm going to close this issue.
Was not able to find if that possible to execute separate test with this setup.