Skip to content

Refactor #422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 4, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
rename "onRunTest" -> "runTest"
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
  • Loading branch information
ShMcK committed Aug 4, 2020
commit 7edba22ecdd178de063a2b9af14f8f4b7472d0aa
2 changes: 1 addition & 1 deletion src/actions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ export { default as onTutorialConfigContinue } from './onTutorialConfigContinue'
export { default as onValidateSetup } from './onValidateSetup'
export { default as onRunReset } from './onRunReset'
export { default as onErrorPage } from './onErrorPage'
export { onRunTest, onTestPass } from './onTest'
export { runTest, onTestPass } from './onTest'
export { onOpenLogs } from './onOpenLogs'
2 changes: 1 addition & 1 deletion src/actions/onTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ export const onTestPass = (action: T.Action, context: Context): void => {
git.saveCommit('Save progress')
}

export const onRunTest = (action?: T.Action): void => {
export const runTest = (action?: T.Action): void => {
vscode.commands.executeCommand(COMMANDS.RUN_TEST, action?.payload)
}
2 changes: 1 addition & 1 deletion src/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class Channel implements Channel {
actions.onOpenLogs(action)
return
case 'EDITOR_RUN_TEST':
actions.onRunTest(action)
actions.runTest(action)
return
case 'EDITOR_RUN_RESET_LATEST':
actions.onRunReset({ type: 'LATEST' }, this.context)
Expand Down
4 changes: 2 additions & 2 deletions src/services/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import openFiles from './utils/openFiles'
import runCommands from './utils/runCommands'
import runVSCodeCommands from './utils/runVSCodeCommands'
import { onError as telemetryOnError } from '../telemetry'
import { onRunTest } from '../../actions/onTest'
import { runTest } from '../../actions/onTest'
import logger from '../logger'

export const onInit = async (actions: TT.StepActions): Promise<void> => {
Expand Down Expand Up @@ -35,7 +35,7 @@ export const onSolutionEnter = async (actions: TT.StepActions): Promise<void> =>
await openFiles(actions?.files)
await runCommands(actions?.commands)
await runVSCodeCommands(actions?.vscodeCommands)
await onRunTest()
await runTest()
}

export const onReset = async (actions: TT.StepActions): Promise<void> => {
Expand Down
2 changes: 1 addition & 1 deletion src/services/testRunner/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const createTestRunner = (data: TT.Tutorial, callbacks: Callbacks): ((params: an
// get tutorial step from position
// check the step actions for specific command
// NOTE: cannot just pass in step actions as the test can be called by:
// - onEditorSave, onWatcher, onSolution, onRunTest, onSubTask
// - onEditorSave, onWatcher, onSolution, runTest, onSubTask
const levels = data.levels
const level = levels.find((l) => l.id === position.levelId)
const step = level?.steps.find((s) => s.id === position.stepId)
Expand Down