Skip to content

Instantly share code, notes, and snippets.

@beyond-code-github
Last active April 17, 2024 08:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beyond-code-github/9c396950ef66430c49b2055aa967ef15 to your computer and use it in GitHub Desktop.
Save beyond-code-github/9c396950ef66430c49b2055aa967ef15 to your computer and use it in GitHub Desktop.
Mocha test boilerplate for Karat studio - Javascript
"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