Skip to content

Commit 006cac0

Browse files
committed
refactor: update fixtures and fix failing tests
1 parent d60c24f commit 006cac0

File tree

11 files changed

+387
-387
lines changed

11 files changed

+387
-387
lines changed

__mocks__/fixtures/bounty.ts

Lines changed: 66 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,76 @@
11
import { Bounty, BountyCourse } from "@/types/bounty";
22
import { colors } from "./colors";
3-
import { metadata } from "./community";
3+
import { mockMetadata } from "./community";
44

55
export const mockBountyCourse: BountyCourse = {
6-
duration: 0,
7-
slug: "intoduction-to-blockchain",
8-
active: false,
9-
id: "123",
10-
ref: "courses/123",
11-
created_at: new Date(),
12-
updated_at: new Date(),
13-
summary: "this is a course",
14-
level: 0,
15-
name: "introduction to blockchain",
16-
description: "",
17-
objectives: [],
18-
locale: "",
19-
community: "icp",
20-
introduction: {
21-
text: "Introduction"
22-
},
23-
certificateIcon: "",
24-
certificateData: {
25-
narrative: "",
26-
icon: ""
27-
},
28-
timestamp: 0,
29-
learningModules: [],
30-
translations: []
31-
}
6+
duration: 0,
7+
slug: "intoduction-to-blockchain",
8+
active: false,
9+
id: "123",
10+
ref: "courses/123",
11+
created_at: new Date(),
12+
updated_at: new Date(),
13+
summary: "this is a course",
14+
level: 0,
15+
name: "introduction to blockchain",
16+
description: "",
17+
objectives: [],
18+
locale: "",
19+
community: "icp",
20+
introduction: {
21+
text: "Introduction",
22+
},
23+
certificateIcon: "",
24+
certificateData: {
25+
narrative: "",
26+
icon: "",
27+
},
28+
timestamp: 0,
29+
learningModules: [],
30+
translations: [],
31+
};
3232
export const mockBounty: Bounty = {
33-
url: "",
34-
image: undefined,
33+
url: "",
34+
image: undefined,
35+
id: "",
36+
ref: "",
37+
created_at: "",
38+
updated_at: "",
39+
icon: "",
40+
active: false,
41+
colors,
42+
description: "",
43+
summary: "",
44+
name: "",
45+
slug: "",
46+
metadata: mockMetadata,
47+
timestamp: 0,
48+
course: mockBountyCourse,
49+
challenge: "",
50+
reward: {
3551
id: "",
3652
ref: "",
37-
created_at: "",
38-
updated_at: "",
39-
icon: "",
40-
active: false,
41-
colors,
42-
description: "",
43-
summary: "",
44-
name: "",
45-
slug: "",
46-
metadata,
47-
timestamp: 0,
48-
course: mockBountyCourse,
53+
created_at: new Date(),
54+
updated_at: new Date(),
4955
challenge: "",
50-
reward: {
51-
id: "",
52-
ref: "",
53-
created_at: new Date(),
54-
updated_at: new Date(),
55-
challenge: "",
56-
type: "",
57-
community: "",
58-
token: "",
59-
stable: false,
60-
fiatCurrency: undefined,
61-
amount: 0,
62-
timestamp: 0,
63-
distribution: undefined
64-
},
65-
community: ""
66-
}
56+
type: "",
57+
community: "",
58+
token: "",
59+
stable: false,
60+
fiatCurrency: undefined,
61+
amount: 0,
62+
timestamp: 0,
63+
distribution: undefined,
64+
},
65+
community: "",
66+
};
6767
export const mockTrailer = {
68-
summary: "trailer summary",
69-
description: "trailer descriptio",
70-
video: "trailer video",
71-
duration: 4,
72-
info: {
73-
items: ["item 1", "item 2"],
74-
title: "info title",
75-
},
68+
summary: "trailer summary",
69+
description: "trailer descriptio",
70+
video: "trailer video",
71+
duration: 4,
72+
info: {
73+
items: ["item 1", "item 2"],
74+
title: "info title",
75+
},
7676
};

0 commit comments

Comments
 (0)