mirror of
https://github.com/Netflix/dial-reference.git
synced 2026-06-08 10:59:59 +00:00
Removed some test workarounds and updated README
This commit is contained in:
@@ -3,30 +3,18 @@
|
||||
const colors = require("colors/safe");
|
||||
const sprintf = require("sprintf-js").sprintf;
|
||||
|
||||
function getParam(key) {
|
||||
var value;
|
||||
var args = process.argv.slice(2);
|
||||
args.forEach(function (param) {
|
||||
if(param.indexOf(key + "=") === 0) {
|
||||
value = param.split("=")[1];
|
||||
}
|
||||
});
|
||||
return value;
|
||||
}
|
||||
|
||||
function printTestInfo(test, msg) {
|
||||
return console.log(sprintf("%-20s : %-s\n%-20s : %-s", "Test", test, "Description", msg));
|
||||
}
|
||||
|
||||
function printSuccess() {
|
||||
function printTestSuccess() {
|
||||
return console.log(colors.green("TEST PASSED\n"));
|
||||
}
|
||||
|
||||
function printFailure(err) {
|
||||
function printTestFailure(err) {
|
||||
return console.log(colors.red(sprintf("%-20s : %-s\n", "TEST FAILED", err)));
|
||||
}
|
||||
|
||||
module.exports.getParam = getParam;
|
||||
module.exports.printTestInfo = printTestInfo;
|
||||
module.exports.printSuccess = printSuccess;
|
||||
module.exports.printFailure = printFailure;
|
||||
module.exports.printTestInfo = printTestInfo;
|
||||
module.exports.printTestSuccess = printTestSuccess;
|
||||
module.exports.printTestFailure = printTestFailure;
|
||||
|
||||
Reference in New Issue
Block a user