Closed justfalter closed 6 years ago
I have just added jasmineExplorer.cwd
in version 1.3.0. The path to jasmine.json
and the paths within that file are relative to the working directory, which should work with your setup.
@hbenl That did the trick! Thank you very much!
It would be nice if there were a way to configure the Jasmine Test Explorer to set it's current working directory to something other than the project workspace root directory. perhaps
jasmineExplorer.cwd
?I've got a project that has distinct frontend and backend components, both having entirely separate unit tests:
I want to be able to configure Jasmine Test Explorer to only discover specs of contents of
proj/backend
without having to open up a VS Code workspace that is exclusive toproj/backend
. There are simply too many things convenient to having a single folder workspace in my situation.Things are set up such that you are expected to execute jasmine from the
proj/backend
orproj/frontend
directories, but never from the root,proj/
. So, if you want to run backend tests, you'd change your current working directory toproj/backend
, and then executenpx jasmine
. If you try to do this from the root of project, things will fail.I have the following in my settings.json:
backend/spec/support/jasmine.json
:However, when loadTests.js is executed, it's current working directory is always the root of the project workspace,
proj/
, and it runs into something problematic somewhere inproj/frontend/
, and bombs out.As a workaround, I've configured
jasmineExplorer.nodeArgv
to load a module whose sole purpose is to change the current working directory toproj/backend/
.settings.json:
And
proj/set-jasmine-workdir-to-backend.js
: