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?
Eun
4 months agoBethanie
3 months agoVal
3 months agoLoreta
4 months agoTiera
5 months agoJaclyn
4 months agoOliva
4 months agoEnola
4 months agoNickie
5 months agoDaron
5 months agoShelton
4 months agoBuck
4 months agoMozell
4 months agoMartha
5 months agoRessie
5 months agoMaryann
5 months agoCiara
4 months agoJose
4 months agoTrina
5 months agoCyndy
5 months ago