Update files

This commit is contained in:
thatblindgeye
2023-01-21 12:53:41 -05:00
parent fb1a2db8d7
commit 4a112362c8
31 changed files with 571 additions and 449 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
const leapYears = function (year) {
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
};
module.exports = leapYears;
@@ -1,22 +1,22 @@
const leapYears = require('./leapYears-solution');
const leapYears = require("./leapYears");
describe('leapYears', () => {
test('works with non century years', () => {
expect(leapYears(1996)).toBe(true);
});
test.skip('works with non century years', () => {
expect(leapYears(1997)).toBe(false);
});
test.skip('works with ridiculously futuristic non century years', () => {
expect(leapYears(34992)).toBe(true);
});
test.skip('works with century years', () => {
expect(leapYears(1900)).toBe(false);
});
test.skip('works with century years', () => {
expect(leapYears(1600)).toBe(true);
});
test.skip('works with century years', () => {
expect(leapYears(700)).toBe(false);
});
describe("leapYears", () => {
test("works with non century years", () => {
expect(leapYears(1996)).toBe(true);
});
test.skip("works with non century years", () => {
expect(leapYears(1997)).toBe(false);
});
test.skip("works with ridiculously futuristic non century years", () => {
expect(leapYears(34992)).toBe(true);
});
test.skip("works with century years", () => {
expect(leapYears(1900)).toBe(false);
});
test.skip("works with century years", () => {
expect(leapYears(1600)).toBe(true);
});
test.skip("works with century years", () => {
expect(leapYears(700)).toBe(false);
});
});