Skip to content

Instantly share code, notes, and snippets.

@valentin-radulescu-hs
Created October 1, 2016 19:12
Show Gist options
  • Select an option

  • Save valentin-radulescu-hs/8fea9460432adb5a0192400d8b1dfaf7 to your computer and use it in GitHub Desktop.

Select an option

Save valentin-radulescu-hs/8fea9460432adb5a0192400d8b1dfaf7 to your computer and use it in GitHub Desktop.
Example of a test written for Mocha
var expect = require('chai').expect;
describe('Dummy tests', function() {
it('should include number 2', function() {
expect([1, 2, 3]).to.include(2);
});
it('should include the string "foo"', function() {
expect('foobar').to.contain('foo');
});
it('should be true', function() {
expect(false).to.be.true;
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment