Created
December 16, 2020 19:19
-
-
Save aterreno/dee5613336f1505a9df7ecc6336215c9 to your computer and use it in GitHub Desktop.
https://coderpad.io/sandbox in javascript with mocha tests
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 Mocha = require ('mocha') | |
const assert = require('chai').assert | |
const mocha = new Mocha ({ui: 'bdd'}) | |
mocha.suite.emit('pre-require', this, 'solution', mocha) | |
const even = (n) => n % 2 === 0; | |
describe('Test suite', () => { | |
it('should work', () => { | |
assert(even(2) === true, "two is even") | |
}) | |
it('should work', () => { | |
assert(even(3) === false, "three is not even") | |
}) | |
}) | |
mocha.run(() => {}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment