This might be basic but I am new to JavaScript and NodeJS in particular.
I would like to be able to use global variables in my scripts but am having trouble doing so
I have a file called variables on the same level as my test.js script for example, and in this example I am assigning Google to the variable url, but when running the test it fails to load.
require('variables.js');
module.exports = {
'Log into Traceiq': function (test) {
test
.open(url)
.done();
}
};
I then tried this and the test starts to run but hangs at the opening stage:
require('./variables');
module.exports = {
'open Google': function (test) {
test
.open(url)
.done();
}
};
This is the output in the console:
Running tests
Running Browser: Google Chrome
OS: Linux 3.5.0-45-generic x86_64
Browser Version: 31.0.1650.63
>> WARNING: done not called!
RUNNING TEST - "Open Google"
✔ 0 Assertions run
✔ TEST - "Open Google" SUCCEEDED
Is there something obvious that I am doing wrong here?