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
Core: Implement a node stdout reporter #790
Changes from 6 commits
f052b16
d4c787e
d335244
fd8f755
dce19be
4a62158
b372cba
9bea625
86e0bfb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,9 @@ | |
"qunit/qunit.css", | ||
"LICENSE.txt" | ||
], | ||
"dependencies": {}, | ||
"dependencies": { | ||
"chalk": "1.0.0" | ||
}, | ||
"devDependencies": { | ||
"browserstack-runner": "0.2.2", | ||
"commitplease": "2.0.0", | ||
|
@@ -45,6 +47,7 @@ | |
"grunt-qunit-istanbul": "0.4.5", | ||
"grunt-search": "0.1.6", | ||
"load-grunt-tasks": "0.3.0", | ||
"qunit-reporter-stdout": "0.1.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If this is only a devDependency, how does There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. my bad here, it needs to be a dependency, not for development. |
||
"testswarm": "1.1.0" | ||
}, | ||
"scripts": { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/*globals QUnit:true*/ | ||
/*jshint node:true*/ | ||
var QUnit = require( "../dist/qunit" ); | ||
|
||
// Options: { output: "minimal" || "verbose" } | ||
QUnit.stdout(); | ||
|
||
// Load QUnit tests | ||
require( "./logs" ); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How do these tests get access to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It will use the QUnit variable assigned above. This current file There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Required files in node don't have access to the scope of the file that is requiring it. So the only way for the required file to have There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See line 3 above. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's okay, but still doesn't explain why it was working before. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. as I told before, this looks like an undocumented feature. Node modules seems to be leaking the current file scope to their following required modules. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you sure about that? QUnit does some crazy stuff with globals and different environments. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, I'm not. I'll check this out on an example repo. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like the |
||
require( "./test" ); | ||
require( "./assert" ); | ||
require( "./async" ); | ||
require( "./promise" ); | ||
require( "./modules" ); | ||
require( "./deepEqual" ); | ||
require( "./globals" ); | ||
require( "./globals-node" ); | ||
|
||
module.exports = QUnit.done; | ||
|
||
QUnit.load(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removing it.