Commit f424b57b authored by Daniel Shumway's avatar Daniel Shumway

feat: move checklist reporter to separate module, bump version.

parent d8337768
Pipeline #10748824 passed with stage
in 29 seconds
{
"name": "distilled-distilled",
"version": "1.0.1",
"description": "An aggressively elegant testing framework, inspired by ideals of simplicity, flexibility, and consistency",
"keywords": [
"unit",
"test",
"distilled",
"carbination",
"mineral"
],
"main": "src/node_modules/Distilled.js",
"scripts": {
"test": "node src/tests/distilled.js && node src/tests/tape.js"
},
"repository": {
"type": "git",
"url": "git+ssh://git@gitlab.com/distilled/distilled.git"
},
"author": {
"name": "danShumway"
},
"license": "MIT",
"bugs": {
"url": "https://gitlab.com/distilled/distilled/issues"
},
"homepage": "https://gitlab.com/distilled/distilled#README",
"devDependencies": {
"tape": "^4.6.3"
}
"name": "distilled-distilled",
"version": "1.0.1",
"description": "An aggressively elegant testing framework, inspired by ideals of simplicity, flexibility, and consistency",
"keywords": [
"unit",
"test",
"distilled",
"carbination",
"mineral"
],
"main": "src/node_modules/Distilled.js",
"scripts": {
"test": "node src/tests/distilled.js && node src/tests/tape.js"
},
"repository": {
"type": "git",
"url": "git+ssh://git@gitlab.com/distilled/distilled.git"
},
"author": {
"name": "danShumway"
},
"license": "MIT",
"bugs": {
"url": "https://gitlab.com/distilled/distilled/issues"
},
"homepage": "https://gitlab.com/distilled/distilled#README",
"devDependencies": {
"tape": "^4.6.3"
},
"dependencies": {
"distilled-reporters-checklist": "0.0.1"
}
}
......@@ -2,7 +2,7 @@ var STATUS = require('constants/status');
var MESSAGES = require('constants/messages').en;
var REPORTERS = Object.freeze({
dot : require('reporters/dot'),
checklist : require('reporters/checklist'),
checklist : require('distilled-reporters-checklist'),
});
(function () {
......
var STATUS = require('constants/status');
var COLORS = {
RED : '\x1b[31m',
GREEN : '\x1b[32m',
RESET : '\x1b[0m'
};
function color (color, str) {
return color + str + COLORS.RESET;
}
module.exports = function () {
var passed = true;
var report = function (test, prefix) {
if (test.label) {
var status = test.status === STATUS.PASSED ?
color(COLORS.GREEN, '(/)') :
color(COLORS.RED, '(X)');
console.log(prefix, status, test.label);
prefix = ' ' + prefix;
if (test.error) {
console.log(test.error);
}
}
passed = passed && test.status === STATUS.PASSED;
test.children.forEach(function (child) {
report(child, prefix);
});
if (test.children.length !== 0) { console.log(); }
};
if (this.parent == null) {
report(this, '-');
console.log(passed ?
color(COLORS.GREEN, 'Test suite passed!') :
color(COLORS.RED, 'Test suite failed!')
);
process.exitCode = passed ? 0 : 1;
}
};
var Distilled = require('Distilled');
var reporter = require('reporters/checklist');
var reporter = require('distilled-reporters-checklist');
function timer(timeout, rejection) {
var result = {};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment