Skip to content

Commit

Permalink
test: track test begin/end
Browse files Browse the repository at this point in the history
  • Loading branch information
davisjam committed Feb 26, 2018
1 parent b23f662 commit d1a85c6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/index.js
Expand Up @@ -148,6 +148,8 @@ function testFile(engine, file, filename, index) {
delete marked._original;
}

console.log('#%d. Test %s.', index, filename);

if (opts.length) {
marked._original = marked.defaults;
marked.defaults = {};
Expand All @@ -165,7 +167,7 @@ function testFile(engine, file, filename, index) {
text = engine(file.text).replace(/\s/g, '');
html = file.html.replace(/\s/g, '');
} catch (e) {
console.log('%s failed.', filename);
console.log(' #%d failed (%s)', index, filename);
throw e;
}

Expand All @@ -192,7 +194,7 @@ function testFile(engine, file, filename, index) {
}
}

console.log('#%d. %s completed.', index, filename);
console.log(' #%d passed (%s)', index, filename);
return true
}

Expand Down

0 comments on commit d1a85c6

Please sign in to comment.