- Hello, {{ $store.state.player.name }}
+ Hi
+ {{ $store.state.time.week }}
+ {{ $store.state.time.season }}
+ {{ $store.state.time.weekday }}
diff --git a/tests/unit/getSeason.spec.js b/tests/unit/getSeason.spec.js
new file mode 100644
index 0000000..bd49fbc
--- /dev/null
+++ b/tests/unit/getSeason.spec.js
@@ -0,0 +1,42 @@
+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)
+});
\ No newline at end of file