Skip to content

Instantly share code, notes, and snippets.

@samueleresca
Created March 5, 2016 11:06
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 samueleresca/e0b4a95e73e8259e0b82 to your computer and use it in GitHub Desktop.
Save samueleresca/e0b4a95e73e8259e0b82 to your computer and use it in GitHub Desktop.
/*
* A single block of unit tests
*/
describe('Date tests', function () {
/*
* The SETUP function : it sets the environment variables
*/
before(function () {
this.date = new Date(2016, 3, 15);
});
/*
* List of assertions
*/
it('date should be defined', function () {
assert(this.date);
});
it('year should be correct', function () {
assert(this.date.getFullYear() === 2016);
});
it('month should be correct', function () {
assert(this.date.getMonth() === 3);
});
it('day should be correct', function () {
assert(this.date.getDate() === 15);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment