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

Commit3f68df6

Browse files
authored
Merge pull request#131 from ShMcK/feature/showHide-console
closes#126. show/hide console on tests
2 parents0f28693 +2bbea4f commit3f68df6

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

‎src/services/testRunner/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import logger from '../../services/logger'
33
importparserfrom'./parser'
44
import{debounce,throttle}from'./throttle'
55
importonErrorfrom'../sentry/onError'
6-
importdisplayOutputfrom'./output'
6+
import{clearOutput,displayOutput}from'./output'
77

88
exportinterfacePayload{
99
stepId:string
@@ -68,6 +68,7 @@ const createTestRunner = (config: TestRunnerConfig, callbacks: Callbacks) => {
6868

6969
// success!
7070
if(tap.ok){
71+
clearOutput()
7172
callbacks.onSuccess(payload)
7273
if(onSuccess){
7374
onSuccess()

‎src/services/testRunner/output.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const getOutputChannel = (name: string): vscode.OutputChannel => {
99
returnchannel
1010
}
1111

12-
constoutputChannelName='TEST_OUTPUT'
12+
constoutputChannelName='CodeRoad Output'
1313

1414
constparseOutput=(text:string):string=>{
1515
letresult=''
@@ -21,11 +21,17 @@ const parseOutput = (text: string): string => {
2121
returnresult
2222
}
2323

24-
constdisplayOutput=(text:string)=>{
24+
exportconstdisplayOutput=(text:string)=>{
2525
constchannel=getOutputChannel(outputChannelName)
26+
channel.clear()
2627
channel.show(true)
2728
constoutput=parseOutput(text)
2829
channel.append(output)
2930
}
3031

31-
exportdefaultdisplayOutput
32+
exportconstclearOutput=()=>{
33+
constchannel=getOutputChannel(outputChannelName)
34+
channel.show(false)
35+
channel.clear()
36+
channel.hide()
37+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp