You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.1 KiB
42 lines
1.1 KiB
|
4 years ago
|
import Seasons from "@/data/seasons";
|
||
|
|
import getSeason from "@/tools/getSeason";
|
||
|
|
|
||
|
|
test('expect week 1 to return season spring', () => {
|
||
|
|
expect(getSeason(1)).toBe(Seasons.Spring);
|
||
|
|
});
|
||
|
|
|
||
|
|
test('expect week 2 to return season summer', () => {
|
||
|
|
expect(getSeason(2)).toBe(Seasons.Summer);
|
||
|
|
});
|
||
|
|
|
||
|
|
test('expect week 3 to return season autumn', () => {
|
||
|
|
expect(getSeason(3)).toBe(Seasons.Autumn);
|
||
|
|
});
|
||
|
|
|
||
|
|
test('expect week 4 to return season winter', () => {
|
||
|
|
expect(getSeason(4)).toBe(Seasons.Winter);
|
||
|
|
});
|
||
|
|
|
||
|
|
test('expect week 5 to return season spring', () => {
|
||
|
|
expect(getSeason(5)).toBe(Seasons.Spring);
|
||
|
|
});
|
||
|
|
|
||
|
|
test('expect week 10 to return season summer', () => {
|
||
|
|
expect(getSeason(10)).toBe(Seasons.Summer);
|
||
|
|
});
|
||
|
|
|
||
|
|
test('expect week 39 to return season autumn', () => {
|
||
|
|
expect(getSeason(39)).toBe(Seasons.Autumn)
|
||
|
|
});
|
||
|
|
|
||
|
|
test('expect week 52 to return season winter', () => {
|
||
|
|
expect(getSeason(52)).toBe(Seasons.Winter)
|
||
|
|
});
|
||
|
|
|
||
|
|
test('expect week 53 to return season spring', () => {
|
||
|
|
expect(getSeason(53)).toBe(Seasons.Spring)
|
||
|
|
});
|
||
|
|
|
||
|
|
test('expect week -1 to return season winter', () => {
|
||
|
|
expect(getSeason(-1)).toBe(Seasons.Winter)
|
||
|
|
});
|