Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
setup reset script
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
  • Loading branch information
ShMcK committed Jul 12, 2020
commit cc029cfbc1333eb8bbf3610718c3e8640a201467
3 changes: 3 additions & 0 deletions src/channel/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,9 @@ class Channel implements Channel {
case 'EDITOR_RUN_TEST':
vscode.commands.executeCommand(COMMANDS.RUN_TEST, action?.payload)
return
case 'EDITOR_RUN_RESET_SCRIPT':
// if tutorial.config.reset.command, run it
return
default:
logger(`No match for action type: ${actionType}`)
return
Expand Down
5 changes: 5 additions & 0 deletions web-app/src/services/state/actions/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,9 @@ export default (editorSend: any) => ({
payload: { position: context.position },
})
},
runResetScript() {
editorSend({
type: 'EDITOR_RUN_RESET_SCRIPT',
})
},
})
3 changes: 3 additions & 0 deletions web-app/src/services/state/machine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ export const createMachine = (options: any) => {
RUN_TEST: {
actions: ['runTest'],
},
RESET_SCRIPT: {
actions: ['runResetScript'],
},
},
},
TestRunning: {
Expand Down