mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
JSHint run-qunit.js
- Turn on devel for console and phantom for the phantomjs globals - Remove unnecessary semicolons - Use strict comparisons - Add missing var statements used by for…in
This commit is contained in:
parent
635c0dbf7a
commit
3782fbed2b
2 changed files with 7 additions and 6 deletions
|
@ -1,5 +1,4 @@
|
|||
app/assets/javascripts/defer/html-sanitizer-bundle.js
|
||||
lib/autospec/run-qunit.js
|
||||
lib/headless-ember.js
|
||||
lib/javascripts/locale/
|
||||
lib/javascripts/messageformat.js
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
/*jshint devel:true, phantom:true */
|
||||
/*global QUnit, ANSI */
|
||||
// THIS FILE IS CALLED BY "qunit_runner.rb" IN AUTOSPEC
|
||||
|
||||
if (phantom.args.length != 1) {
|
||||
if (phantom.args.length !== 1) {
|
||||
console.log("Usage: " + phantom.scriptName + " <URL>");
|
||||
phantom.exit(1);
|
||||
}
|
||||
|
@ -95,7 +97,7 @@ function colorizer() {
|
|||
return colorCode + text + colorEnd;
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
function logQUnit() {
|
||||
|
@ -144,10 +146,10 @@ function logQUnit() {
|
|||
// display failures
|
||||
if (Object.keys(errors).length > 0) {
|
||||
console.log("Failures:\n");
|
||||
for (m in errors) {
|
||||
for (var m in errors) {
|
||||
var module = errors[m];
|
||||
console.log("Module Failed: " + ANSI.highlight(m, "red"));
|
||||
for (t in module) {
|
||||
for (var t in module) {
|
||||
var test = module[t];
|
||||
console.log(" Test Failed: " + t);
|
||||
for (var a = 0; a < test.length; a++) {
|
||||
|
@ -172,4 +174,4 @@ function logQUnit() {
|
|||
window.qunitResult = context;
|
||||
});
|
||||
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue