Created
March 5, 2016 11:06
-
-
Save samueleresca/e0b4a95e73e8259e0b82 to your computer and use it in GitHub Desktop.
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
/* | |
* 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