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

Commit5048f20

Browse files
committed
handle test error
1 parentedeb01b commit5048f20

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

‎src/actions/runTest.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ interface Props {
2323
onSuccess():void
2424
onFail():void
2525
onRun():void
26+
onError():void
2627
}
2728

28-
asyncfunctionrunTest({onSuccess, onFail, onRun}:Props):Promise<void>{
29+
asyncfunctionrunTest({onSuccess, onFail, onRun, onError}:Props):Promise<void>{
2930
// increment process id
3031
constprocessId=++currentId
3132

@@ -99,6 +100,7 @@ async function runTest({onSuccess, onFail, onRun}: Props): Promise<void> {
99100

100101
if(!stdout){
101102
console.error('SOMETHING WENT WRONG WITH A PASSING TEST')
103+
onError()
102104
}
103105
// test runner failed
104106
channel=getOutputChannel(outputChannelName)

‎web-app/src/services/channel/index.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ class Channel {
2525
this.machineSend=send
2626
}
2727
publicreceive=(event:ReceivedEvent)=>{
28-
console.log('CLIENT RECEIVE')
2928
constaction=event.data
3029

3130
//@ts-ignore // ignore browser events from plugins
@@ -41,16 +40,20 @@ class Channel {
4140
case'TEST_PASS':
4241
// { type: 'TEST_PASS', payload: { stepId: string }}
4342
this.machineSend(action)
44-
console.log('test passed')
4543
return
4644
case'TEST_FAIL':
4745
this.machineSend(action)
4846
return
4947
case'TEST_RUN':
5048
console.log('TEST_RUN')
49+
this.machineSend(action)
50+
return
51+
case'TEST_ERROR':
52+
console.log('TEST_ERROR')
53+
this.machineSend(action)
5154
return
5255
case'ACTIONS_LOADED':
53-
console.log('ACTIONS_LOADED')
56+
// TODO: use this for verifying completion of stepActions
5457
return
5558
default:
5659
if(action.type){

‎web-app/src/services/state/machine.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ export const machine = Machine<CR.MachineContext, CR.MachineStateSchema, CR.Mach
124124
actions:['updateStepProgress']
125125
},
126126
TEST_FAIL:'TestFail',
127+
TEST_ERROR:'Normal'
127128
},
128129
},
129130
TestPass:{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp