Tests not completing
Closed this issue · 6 comments
I am trying to run qunits inside a node application. However the tests do not seem to complete and never prints the report to the console.
When I run the tests, I see this message Testing C:\root\app\uploads\source_code.js ...
I have added the below line of code to point to node-qunit module:
var testrunner = require('../node_modules/qunit');
I have this code to run the tests against a source code (this is in tester.js):
testrunner.run({
code: "app/uploads/source_code.js",
tests: "tests/tests.js"
},function(err, report) {
console.log(report);
});
source_code.js
function sayHello() {
return "Hello";
}
tests.js
test( "Hello", function() {
ok(true);
});
My application structure is:
- root
- app
- uploads
- source_code.js
- uploads
- tests
- tests.js
- tester.js
- app
I am using the "latest" version of node-qunit and running node version 0.8.14 and express 4.x
Can you please let me know what is the issue here?
except that you can use var testrunner = require('qunit'); I don't see what is wrong in your example.
I did modify the require
as suggested. I still see the same issue.
It seems that the testrunner does NOT exit the loop though I am not sure what the testrunner is waiting for.
I don't see from your example what can be wrong.
of course your code can't be tested because you don't export any api, but it doesn't matter
please reopen the issue if you have more information
Will do, at this time however it does not work :-(