I'm encountering an issue where I can only run individual nightwatchjs tests when using the absolute path of the test script.
For instance, if I execute my test from the following directory;
/Users/darrenharley/Documents/Git/uk-content-parkers/Tests/Functional/tests
using the command;
npm run test:live /Users/darrenharley/Documents/Git/uk-content-parkers/Tests/Functional/tests/current_functionality/gamAds/PAR-5139.js
It runs successfully.
However, I require running this test without relying on my local file structure (as it will eventually be triggered via a Jenkins build so the absolute path cannot be used).
If I try to run the test with the following command;
npm run test:live ./current_functionality/gamAds/PAR-5139.js
It fails and returns the error message;
Error: ENOENT: no such file or directory, stat './current_functionality/gamAds/PAR-5139.js'
Am I making an obvious mistake here?
As a reference, in my nightwatch.conf.js file, I have specified this;
src_folders: [
'tests/',
],
and in my package.json file, the relevant script is defined as;
"test:live": "nightwatch --config config/nightwatch.conf.js --env live --suiteRetries 3",
Any assistance would be welcome, as I find it frustrating that something so basic is causing such trouble.
Thank you in advance.