Skip to content

Commit cba3be5

Browse files
committed
test: more test cases for getTutorial
1 parent f682622 commit cba3be5

File tree

3 files changed

+499
-8
lines changed

3 files changed

+499
-8
lines changed
Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
{
2+
"parts": {
3+
"1-part": {
4+
"id": "1-part",
5+
"order": 0,
6+
"data": {
7+
"type": "part",
8+
"title": "Basics"
9+
},
10+
"slug": "part-slug",
11+
"chapters": {
12+
"1-chapter": {
13+
"id": "1-chapter",
14+
"order": 0,
15+
"data": {
16+
"title": "The first chapter in part 1",
17+
"type": "chapter"
18+
},
19+
"slug": "chapter-slug",
20+
"lessons": {
21+
"1-first": {
22+
"data": {
23+
"type": "lesson",
24+
"title": "Welcome to TutorialKit",
25+
"template": "default",
26+
"i18n": {
27+
"mocked": "default localization"
28+
},
29+
"openInStackBlitz": true
30+
},
31+
"id": "1-first",
32+
"filepath": "1-part/1-chapter/1-first/content.md",
33+
"order": 0,
34+
"part": {
35+
"id": "1-part",
36+
"title": "Basics"
37+
},
38+
"chapter": {
39+
"id": "1-chapter",
40+
"title": "The first chapter in part 1"
41+
},
42+
"Markdown": "Markdown for tutorial",
43+
"slug": "lesson-slug",
44+
"files": [
45+
"1-part-1-chapter-1-first-files.json",
46+
[]
47+
],
48+
"solution": [
49+
"1-part-1-chapter-1-first-solution.json",
50+
[]
51+
],
52+
"next": {
53+
"title": "Welcome to TutorialKit",
54+
"href": "/part-slug/chapter-slug/lesson-slug"
55+
}
56+
}
57+
},
58+
"firstLessonId": "1-first"
59+
}
60+
},
61+
"firstChapterId": "1-chapter"
62+
},
63+
"2-part": {
64+
"id": "2-part",
65+
"order": 1,
66+
"data": {
67+
"type": "part",
68+
"title": "Basics"
69+
},
70+
"slug": "part-slug",
71+
"chapters": {
72+
"2-chapter": {
73+
"id": "2-chapter",
74+
"order": 0,
75+
"data": {
76+
"title": "The first chapter in part 1",
77+
"type": "chapter"
78+
},
79+
"slug": "chapter-slug",
80+
"lessons": {
81+
"1-second": {
82+
"data": {
83+
"type": "lesson",
84+
"title": "Welcome to TutorialKit",
85+
"template": "default",
86+
"i18n": {
87+
"mocked": "default localization"
88+
},
89+
"openInStackBlitz": true
90+
},
91+
"id": "1-second",
92+
"filepath": "2-part/2-chapter/1-second/content.md",
93+
"order": 0,
94+
"part": {
95+
"id": "2-part",
96+
"title": "Basics"
97+
},
98+
"chapter": {
99+
"id": "2-chapter",
100+
"title": "The first chapter in part 1"
101+
},
102+
"Markdown": "Markdown for tutorial",
103+
"slug": "lesson-slug",
104+
"files": [
105+
"2-part-2-chapter-1-second-files.json",
106+
[]
107+
],
108+
"solution": [
109+
"2-part-2-chapter-1-second-solution.json",
110+
[]
111+
],
112+
"prev": {
113+
"title": "Welcome to TutorialKit",
114+
"href": "/part-slug/chapter-slug/lesson-slug"
115+
},
116+
"next": {
117+
"title": "Welcome to TutorialKit",
118+
"href": "/part-slug/chapter-slug/lesson-slug"
119+
}
120+
}
121+
},
122+
"firstLessonId": "1-second"
123+
}
124+
},
125+
"firstChapterId": "2-chapter"
126+
},
127+
"3-part": {
128+
"id": "3-part",
129+
"order": 2,
130+
"data": {
131+
"type": "part",
132+
"title": "Basics"
133+
},
134+
"slug": "part-slug",
135+
"chapters": {
136+
"3-chapter": {
137+
"id": "3-chapter",
138+
"order": 0,
139+
"data": {
140+
"title": "The first chapter in part 1",
141+
"type": "chapter"
142+
},
143+
"slug": "chapter-slug",
144+
"lessons": {
145+
"1-third": {
146+
"data": {
147+
"type": "lesson",
148+
"title": "Welcome to TutorialKit",
149+
"template": "default",
150+
"i18n": {
151+
"mocked": "default localization"
152+
},
153+
"openInStackBlitz": true
154+
},
155+
"id": "1-third",
156+
"filepath": "3-part/3-chapter/1-third/content.md",
157+
"order": 0,
158+
"part": {
159+
"id": "3-part",
160+
"title": "Basics"
161+
},
162+
"chapter": {
163+
"id": "3-chapter",
164+
"title": "The first chapter in part 1"
165+
},
166+
"Markdown": "Markdown for tutorial",
167+
"slug": "lesson-slug",
168+
"files": [
169+
"3-part-3-chapter-1-third-files.json",
170+
[]
171+
],
172+
"solution": [
173+
"3-part-3-chapter-1-third-solution.json",
174+
[]
175+
],
176+
"prev": {
177+
"title": "Welcome to TutorialKit",
178+
"href": "/part-slug/chapter-slug/lesson-slug"
179+
}
180+
}
181+
},
182+
"firstLessonId": "1-third"
183+
}
184+
},
185+
"firstChapterId": "3-chapter"
186+
}
187+
},
188+
"firstPartId": "1-part"
189+
}
Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
{
2+
"parts": {
3+
"1-part": {
4+
"id": "1-part",
5+
"order": 0,
6+
"data": {
7+
"type": "part",
8+
"title": "Basics"
9+
},
10+
"slug": "part-slug",
11+
"chapters": {
12+
"1-chapter": {
13+
"id": "1-chapter",
14+
"order": 0,
15+
"data": {
16+
"title": "The first chapter in part 1",
17+
"type": "chapter"
18+
},
19+
"slug": "chapter-slug",
20+
"lessons": {
21+
"1-first": {
22+
"data": {
23+
"type": "lesson",
24+
"title": "Welcome to TutorialKit",
25+
"template": "default",
26+
"i18n": {
27+
"mocked": "default localization"
28+
},
29+
"openInStackBlitz": true
30+
},
31+
"id": "1-first",
32+
"filepath": "1-part/1-chapter/1-first/content.md",
33+
"order": 0,
34+
"part": {
35+
"id": "1-part",
36+
"title": "Basics"
37+
},
38+
"chapter": {
39+
"id": "1-chapter",
40+
"title": "The first chapter in part 1"
41+
},
42+
"Markdown": "Markdown for tutorial",
43+
"slug": "lesson-slug",
44+
"files": [
45+
"1-part-1-chapter-1-first-files.json",
46+
[]
47+
],
48+
"solution": [
49+
"1-part-1-chapter-1-first-solution.json",
50+
[]
51+
],
52+
"next": {
53+
"title": "Welcome to TutorialKit",
54+
"href": "/part-slug/chapter-slug/lesson-slug"
55+
}
56+
}
57+
},
58+
"firstLessonId": "1-first"
59+
},
60+
"2-chapter": {
61+
"id": "2-chapter",
62+
"order": 1,
63+
"data": {
64+
"title": "The first chapter in part 1",
65+
"type": "chapter"
66+
},
67+
"slug": "chapter-slug",
68+
"lessons": {
69+
"1-second": {
70+
"data": {
71+
"type": "lesson",
72+
"title": "Welcome to TutorialKit",
73+
"template": "default",
74+
"i18n": {
75+
"mocked": "default localization"
76+
},
77+
"openInStackBlitz": true
78+
},
79+
"id": "1-second",
80+
"filepath": "1-part/2-chapter/1-second/content.md",
81+
"order": 0,
82+
"part": {
83+
"id": "1-part",
84+
"title": "Basics"
85+
},
86+
"chapter": {
87+
"id": "2-chapter",
88+
"title": "The first chapter in part 1"
89+
},
90+
"Markdown": "Markdown for tutorial",
91+
"slug": "lesson-slug",
92+
"files": [
93+
"1-part-2-chapter-1-second-files.json",
94+
[]
95+
],
96+
"solution": [
97+
"1-part-2-chapter-1-second-solution.json",
98+
[]
99+
],
100+
"prev": {
101+
"title": "Welcome to TutorialKit",
102+
"href": "/part-slug/chapter-slug/lesson-slug"
103+
},
104+
"next": {
105+
"title": "Welcome to TutorialKit",
106+
"href": "/part-slug/chapter-slug/lesson-slug"
107+
}
108+
}
109+
},
110+
"firstLessonId": "1-second"
111+
},
112+
"3-chapter": {
113+
"id": "3-chapter",
114+
"order": 2,
115+
"data": {
116+
"title": "The first chapter in part 1",
117+
"type": "chapter"
118+
},
119+
"slug": "chapter-slug",
120+
"lessons": {
121+
"1-third": {
122+
"data": {
123+
"type": "lesson",
124+
"title": "Welcome to TutorialKit",
125+
"template": "default",
126+
"i18n": {
127+
"mocked": "default localization"
128+
},
129+
"openInStackBlitz": true
130+
},
131+
"id": "1-third",
132+
"filepath": "1-part/3-chapter/1-third/content.md",
133+
"order": 0,
134+
"part": {
135+
"id": "1-part",
136+
"title": "Basics"
137+
},
138+
"chapter": {
139+
"id": "3-chapter",
140+
"title": "The first chapter in part 1"
141+
},
142+
"Markdown": "Markdown for tutorial",
143+
"slug": "lesson-slug",
144+
"files": [
145+
"1-part-3-chapter-1-third-files.json",
146+
[]
147+
],
148+
"solution": [
149+
"1-part-3-chapter-1-third-solution.json",
150+
[]
151+
],
152+
"prev": {
153+
"title": "Welcome to TutorialKit",
154+
"href": "/part-slug/chapter-slug/lesson-slug"
155+
}
156+
}
157+
},
158+
"firstLessonId": "1-third"
159+
}
160+
},
161+
"firstChapterId": "1-chapter"
162+
}
163+
},
164+
"firstPartId": "1-part"
165+
}

0 commit comments

Comments
 (0)