Update code formatting in /test/run to match conventions I use elsewhere
This commit is contained in:
parent
8b5e88674c
commit
9d5990f80a
15
test/run
15
test/run
|
@ -1,9 +1,11 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
var util = require("util");
|
||||
var fs = require("fs");
|
||||
var PEG = require("../lib/peg");
|
||||
var QUnit = require("./vendor/qunit/qunit");
|
||||
var util = require("util"),
|
||||
fs = require("fs"),
|
||||
PEG = require("../lib/peg"),
|
||||
QUnit = require("./vendor/qunit/qunit");
|
||||
|
||||
var failedAssertions = [];
|
||||
|
||||
function bold(s) { return "\u001B[1m" + s + "\u001B[22m"; };
|
||||
function message(s) { return "\u001B[35m" + s + "\u001B[39m"; };
|
||||
|
@ -23,8 +25,6 @@ QUnit.moduleStart(function(details) {
|
|||
util.puts(bold(details.name));
|
||||
});
|
||||
|
||||
var failedAssertions = [];
|
||||
|
||||
QUnit.testStart(function(details) {
|
||||
failedAssertions = [];
|
||||
});
|
||||
|
@ -42,9 +42,10 @@ QUnit.testDone(function(details) {
|
|||
});
|
||||
|
||||
QUnit.log(function(details) {
|
||||
var output = "";
|
||||
|
||||
if (details.result) { return; }
|
||||
|
||||
var output = ""
|
||||
if (details.message) {
|
||||
output += indent("Message: " + message(details.message)) + "\n";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue