Last active
April 17, 2024 08:43
-
-
Save beyond-code-github/9c396950ef66430c49b2055aa967ef15 to your computer and use it in GitHub Desktop.
Mocha test boilerplate for Karat studio - Javascript
This file contains 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
"use strict"; | |
const Mocha = require('mocha'); | |
const {describe, it} = Mocha; | |
const chai = require('chai'); | |
const {assert} = chai; | |
chai.should(); | |
const testRunner = new Mocha({ slow: 1000 }); | |
testRunner.suite.emit('pre-require', global, 'nofile', testRunner); | |
describe("test", () => { | |
it("true should be true", () => { | |
assert.equal(true, true); | |
}) | |
it("Empty array should have zero length", () => { | |
[].should.have.length == 0 | |
}) | |
}); | |
testRunner.run(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment