I want to be able to run the same test twice from a node express server, but noticed the second run of the same test always gives "no specs found".
Here is an example : jasmine-test.js :
function jasmineExecute(fileName) {
var jasmine = new Jasmine({});
jasmine.onComplete(function(x) {
if (x) {
jasmineExecute("./test.js"); // risk of infinite loop
}
else {
console.log('Test failed : ' + fileName);
}
});
jasmine.execute([
fileName
]);
}
jasmineExecute("./test.js");
test.js :
describe("We test that ", function() {
it("The return should be true", function() {
expect(true).toBe(true);
});
});
The result I have is as follow :
Randomized with seed 03122
Started
.
1 spec, 0 failures
Finished in 0.006 seconds
Randomized with seed 03122 (jasmine --random=true --seed=03122)
Randomized with seed 51883
Started
No specs found
Finished in 0.005 seconds
Incomplete: No specs found
Randomized with seed 51883 (jasmine --random=true --seed=51883)
Test failed : ./test.js
I am running on Jasmine 5.6.0 and node 8.9.4. Any help on this will be welcome.