Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests not completing #104

Closed
poleveD opened this issue Sep 30, 2014 · 6 comments
Closed

Tests not completing #104

poleveD opened this issue Sep 30, 2014 · 6 comments
Labels

Comments

@poleveD
Copy link

poleveD commented Sep 30, 2014

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
    • tests
      • tests.js
      • tester.js

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?

@kof
Copy link
Contributor

kof commented Sep 30, 2014

except that you can use var testrunner = require('qunit'); I don't see what is wrong in your example.

@kof kof added the support label Sep 30, 2014
@poleveD
Copy link
Author

poleveD commented Sep 30, 2014

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.

@kof
Copy link
Contributor

kof commented Oct 3, 2014

I don't see from your example what can be wrong.

@kof
Copy link
Contributor

kof commented Oct 3, 2014

of course your code can't be tested because you don't export any api, but it doesn't matter

@kof
Copy link
Contributor

kof commented Oct 3, 2014

please reopen the issue if you have more information

@kof kof closed this as completed Oct 3, 2014
@poleveD
Copy link
Author

poleveD commented Oct 8, 2014

Will do, at this time however it does not work :-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants