Skip to content

Commit

Permalink
1.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
acegoal07 committed Jan 20, 2023
1 parent f37b9f2 commit cd1e730
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions test.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
const fileTools = require("./dist");
const top_bottom = "|------------------------------|--------|"
const top_bottom_size = 28;
const top_bottom = `|${"-".repeat(top_bottom_size + 2)}|--------|`;

/**
*
* @param {String} testName
* @param {Boolean} value
*/
function logFormatter (testName, value = false) {
try {
const size = 28;
const output = `| ${testName}${" ".repeat((size - testName.length))} | ${value? "\x1b[92mPASSED\x1b[0m" : "\x1b[91mFAILED\x1b[0m"} |`
console.log(output);
} catch (error) {
throw new Error(error);
}
console.log(`| ${testName}${" ".repeat((top_bottom_size - testName.length))} | ${value? "\x1b[92mPASSED\x1b[0m" : "\x1b[91mFAILED\x1b[0m"} |`);
}
console.log(top_bottom);
console.log("| TEST | STATUS |")
Expand Down

0 comments on commit cd1e730

Please sign in to comment.