A developer has implemented a class that calculates if a given date is a leap year. The definition
for the leap year is given:
Every year that is exactly divisible by four is a leap year, except for years that are exactly
divisible by 100, but these centurial years are leap years if they are exactly divisible by 400.
- divisible by 4
- but not by 100
- years divisible by 400 are leap anyway
You have already thought about it and started with the first test class; the test class looks like
(pseudo JavaScript used here):
// LeapYear.spec.js
describe('Leap year calculator', () => {
it('should consider 1996 as leap', () => {
expect(LeapYear.isLeap(1996)).toBe(true);
});
});
What would now be your next step to proceed as efficient as possible, to validate the correctness
of the class above?
Yuriko
8 months agoLinn
8 months agoTorie
8 months agoLorrie
8 months agoBrande
8 months agoFelton
9 months agoCorrie
9 months agoPansy
9 months agoEloisa
9 months agoRonnie
9 months agoRory
9 months agoSage
9 months agoDaniela
9 months agoJusta
9 months agoGlory
9 months agoPaz
9 months agoAhmed
10 months agoErinn
10 months ago