mirror of
https://github.com/10h30/odin-javascript-exercises.git
synced 2026-07-14 04:06:07 +09:00
remove class based exercises
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
var leapYears = function() {
|
||||
|
||||
var leapYears = function(year) {
|
||||
if (year % 4 !== 0 || (year % 100 == 0 && year % 400 != 0)) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
module.exports = leapYears
|
||||
|
||||
@@ -4,19 +4,19 @@ describe('leapYears', function() {
|
||||
it('works with non century years', function() {
|
||||
expect(leapYears(1996)).toEqual(true);
|
||||
});
|
||||
xit('works with non century years', function() {
|
||||
it('works with non century years', function() {
|
||||
expect(leapYears(1997)).toEqual(false);
|
||||
});
|
||||
xit('works with ridiculously futuristic non century years', function() {
|
||||
it('works with ridiculously futuristic non century years', function() {
|
||||
expect(leapYears(34992)).toEqual(true);
|
||||
});
|
||||
xit('works with century years', function() {
|
||||
it('works with century years', function() {
|
||||
expect(leapYears(1900)).toEqual(false);
|
||||
});
|
||||
xit('works with century years', function() {
|
||||
it('works with century years', function() {
|
||||
expect(leapYears(1600)).toEqual(true);
|
||||
});
|
||||
xit('works with century years', function() {
|
||||
it('works with century years', function() {
|
||||
expect(leapYears(700)).toEqual(false);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user