Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0f06b1b

Browse files
authored
Merge pull request#384 from coderoad/feature/subtask-markdown
update subtask schema
2 parents12c1fe1 +ed664e3 commit0f06b1b

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

‎src/services/testRunner/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ const createTestRunner = (data: TT.Tutorial, callbacks: Callbacks) => {
112112
summary:tap.summary,
113113
}
114114

115-
if(step.setup.subtasks){
115+
if(step.subtasks){
116116
constsubtaskSummary=parseSubtasks(tap.summary,position.stepId||'')
117117

118118
callbacks.onFail(position,{

‎typings/tutorial.d.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ export type Step = {
2727
content:string
2828
setup:StepActions
2929
solution:Maybe<StepActions>
30-
subtasks?:{[index:number]:boolean}
3130
hints?:string[]
31+
subtasks?:string[]
3232
}
3333

3434
/** A tutorial for use in VSCode CodeRoad */
@@ -52,7 +52,6 @@ export type StepActions = {
5252
files?:string[]
5353
watchers?:string[]
5454
filter?:string
55-
subtasks?:string[]
5655
}
5756

5857
exportinterfaceTestRunnerArgs{

‎web-app/src/containers/Tutorial/components/Level.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ const Level = ({
199199
returnnull
200200
}
201201
letsubtasks=null
202-
if(step?.setup?.subtasks){
203-
subtasks=step.setup.subtasks.map((subtask:string,subtaskIndex:number)=>({
202+
if(step?.subtasks){
203+
subtasks=step.subtasks.map((subtask:string,subtaskIndex:number)=>({
204204
name:subtask,
205205
pass:!!(testStatus?.summary ?testStatus.summary[subtaskIndex] :false),
206206
}))

‎web-app/src/services/state/actions/editor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export default (editorSend: any) => ({
5757
},
5858
})
5959

60-
if(step.setup.subtasks){
60+
if(step.subtasks){
6161
// load subtask summary by running tests and parsing result
6262
editorSend({
6363
type:'EDITOR_RUN_TEST',

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp