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

Commit8653dca

Browse files
committed
clean up test fail logs
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parenta205435 commit8653dca

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

‎src/commands.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ interface CreateCommandProps {
2121
}
2222

2323
letsendToClient=(action:T.Action):void=>{
24-
// function is replaced whenwebclient loads
24+
// function is replaced whenwebview mounts
2525
}
2626

2727
// This makes it easier to pass the send
2828
// function throughout the codebase
2929
exportconstsend=(action:T.Action):void=>{
30-
logger(`EXT TO CLIENT: "${typeofaction==='string' ?action :action.type}"`)
31-
32-
if(action)sendToClient(action)
30+
// log send of event to client
31+
logger(`${typeofaction==='string' ?action :action.type}`)
32+
sendToClient(action)
3333
}
3434

3535
exportconstcreateCommands=(commandProps:CreateCommandProps):{[key:string]:any}=>{
@@ -91,7 +91,7 @@ export const createCommands = (commandProps: CreateCommandProps): { [key: string
9191
},
9292
onRun:(position:T.Position)=>{
9393
// send test run message back to client
94-
send({type:'TEST_RUNNING',payload:{ position}})
94+
send({type:'START_TEST',payload:{ position}})
9595
},
9696
onLoadSubtasks:({ summary})=>{
9797
send({type:'LOAD_SUBTASK_RESULTS',payload:{ summary}})

‎src/services/testRunner/index.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ const createTestRunner = (data: TT.Tutorial, callbacks: Callbacks): ((params: an
7272
command=[command,testRunnerFilterArg,testFilter].join(' ')
7373
}
7474
}
75-
logger('COMMAND',command)
75+
logger(`COMMAND:${command}`)
7676
result=awaitexec({ command,dir:testRunnerConfig.directory})
7777
}catch(err:any){
7878
result={stdout:err.stdout,stderr:err.stack}
@@ -84,13 +84,15 @@ const createTestRunner = (data: TT.Tutorial, callbacks: Callbacks): ((params: an
8484
return
8585
}
8686

87-
logger('----------------- PROCESSTEST -----------------')
87+
logger('----------------TEST RESULTS -----------------')
8888

8989
const{ stdout, stderr}=result
9090

9191
consttap:ParserOutput=parser(stdout||'')
9292

93-
logger(tap.logs.join('\n'))
93+
if(tap.logs.length){
94+
logger(tap.logs.join('\n'))
95+
}
9496

9597
if(stderr){
9698
if(!tap.failed.length){

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export const createMachine = (options: any) => {
157157
LOAD_SUBTASK_RESULTS:{
158158
actions:['testSubtasks'],
159159
},
160-
TEST_RUNNING:'TestRunning',
160+
START_TEST:'TestRunning',
161161
STEP_SOLUTION_LOAD:{
162162
actions:['editorLoadSolution'],
163163
},

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp