Closed GP4cK closed 3 years ago
try setting haxeTestExplorer.testCommand
- you can put something like ["npm", "test"]
in there
then you want to make sure that your compilation step includes a -lib test-adapter
so it gets compiled into your "binary" - required to make results show up in test explorer view
note: compilation should happen from project root otherwise .unittest
folder might end up where it won't be picked up by test adapter
Sorry I'm confused. The config you proposed is for this package, right? I'm only using this one... If I write "haxeTestExplorer" or "haxeTestExplorer.testCommand" in my .vscode/settings.json, VSCode tells me "unknown configuration setting".
Actually, I can just call npm run pretest
before launching the tests with the test explorer. But I would still need an option to run the tests in band / one after another rather than concurrently.
Ohh wow, I'm the one being confused... I thought your issue was posted over at Haxe's test adapter repository. I didn't realise we were in the main test explorer UI repository. sorry, my bad. disregard my steps to solve your issue.
anyway you might want to look at what actual test adapter you are using and see if it has a way to do what you need.
@AlexHaxe you're right, better create another issue over there. Thanks https://github.com/kavod-io/vscode-jest-test-adapter/issues/118
I have a NodeJS project with a
pretest
command which sets up a docker container with a postgres database. Most of my tests are then populating the db inside abeforeAll
, then running some logic, then clearing the db with anafterAll
.When I run
npm test
, thepretest
command is automatically run by npm / node. Is there a way to setup a pre-job when using this extension?