Skip to content

Instantly share code, notes, and snippets.

Avatar

David Workman kabootit

View GitHub Profile
@kabootit
kabootit / tester.js
Last active Nov 5, 2018 — forked from freedmand/tester.js
JavaScript unit testing in under 30 lines
View tester.js
const PASS = ['32']; // green
const FAIL = ['31', '1']; // red, bold
function logStyle(ansiEscapeCodes, text) {
console.log(`\x1b[${ansiEscapeCodes.join(';')}m${text}\x1b[0m`);
}
class Tester {
constructor() {}
You can’t perform that action at this time.