Skip to content

Commit

Permalink
add time elapsed to TAP output
Browse files Browse the repository at this point in the history
  • Loading branch information
izelnakri committed Feb 21, 2021
1 parent faaa56a commit c6cc4d7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/setup-node-js-environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ window.QUnit.on('testEnd', (details) => { // NOTE: https://github.com/qunitjs/qu
console.log(`not ok ${testCount}`, details.fullName.join(' | '), '# skip');
} else if (details.status === 'failed') {
passCount++;
console.log(`not ok ${testCount}`, details.fullName.join(' | '));
console.log(`not ok ${testCount}`, details.fullName.join(' | '), `# (${details.runtime} ms)`);
details.assertions.reduce((errorCount, assertion, index) => {
if (!assertion.passed && assertion.todo === false) {
errorCount++;
let stack = assertion.stack.match(/\(.+\)/g);

console.log(' ---');
console.log(indentString(yaml.safeDump({
name: `Assertion #${index + 1}`,
name: `Assertion #${index + 1}`, // TODO: check what happens on runtime errors
actual: assertion.actual || null,
expected: assertion.expected || null,
message: assertion.message || null,
Expand All @@ -54,7 +54,7 @@ window.QUnit.on('testEnd', (details) => { // NOTE: https://github.com/qunitjs/qu
}, 0);
} else if (details.status === 'passed') {
passCount++;
console.log(`ok ${testCount}`, details.fullName.join(' | '));
console.log(`ok ${testCount}`, details.fullName.join(' | '), `# (${details.runtime} ms)`);
}

});
Expand Down

0 comments on commit c6cc4d7

Please sign in to comment.