Last active
June 3, 2018 04:58
-
-
Save josephmcasey/f616baffc9e3cdc5b32daf500a896436 to your computer and use it in GitHub Desktop.
Coder Pad JavaScript Template
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
/* Imports & Setup */ | |
const _ = require('lodash'); | |
const Mocha = require('mocha') | |
const mocha = new Mocha() | |
const chai = require('chai') | |
const sinon = require('sinon') | |
const sChai = require('sinon-chai') | |
mocha.suite.emit('pre-require', this, 'solution', mocha) // Bit of a hack, sorry! | |
chai.should() | |
chai.use(sinonChai) | |
/* | |
Problem Set Name: | |
Space Complexity: | |
Time Complexity: | |
*/ | |
/* Tests */ | |
describe('Test suite', function() { | |
let spy | |
beforeEach(() => { | |
spy = sinon.spy() | |
}) | |
it('Sanity Check', () => { | |
hello('world', spy) | |
spy.should.have.been.calledWith('hello world') | |
spy.should.have.been.called | |
function hello(name, cb) { | |
cb('hello ' + name) | |
} | |
}) | |
it('Should Work', () => { | |
}) | |
}) | |
mocha.run() | |
/* Implementation */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment