Skip to content

Instantly share code, notes, and snippets.

@joseconstela
Created June 27, 2016 12:23
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 joseconstela/7b7950d6b3213e53e160d8dd5f60c701 to your computer and use it in GitHub Desktop.
Save joseconstela/7b7950d6b3213e53e160d8dd5f60c701 to your computer and use it in GitHub Desktop.
Mocha and chai testing for MeteorJS - this is an example for http://joseconstela.com/continuous-integration-with-meteorjs-and-travis
require('./actions');
describe( 'actions tests', () => {
it( 'dilbert', () => {
var actionResult = actions['dilbert']();
assert.typeOf( actionResult, 'object' );
assert.typeOf( actionResult.display, 'object' );
assert.typeOf( actionResult.display.title, 'string' );
assert.typeOf( actionResult.display.link, 'string' );
assert.typeOf( actionResult.display.html, 'string' );
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment