remove class based exercises

This commit is contained in:
Cody Loyd
2017-11-20 13:51:01 -06:00
parent f0bf584e59
commit 290e7f1da4
18 changed files with 67 additions and 164 deletions
+5 -2
View File
@@ -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
+5 -5
View File
@@ -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);
});
});