Last active
January 12, 2016 19:28
-
-
Save webpapaya/e7ee56a57a433743827e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const assert = (description, test) => { | |
if(test()) { console.log(`✔ ${description}`); } | |
else { console.error(`✖ ${description}`); } | |
}; | |
const describe = (description, tests) => { | |
console.log('----------------------------'); | |
console.log(`%c${description}`, `font-weight:800;`); | |
tests(); | |
}; | |
describe('Testing the testing framework', () => { | |
assert('I must pass', () => true); | |
assert('I should fail', () => false); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment