Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import logger from '../../services/logger'
3
3
import parser from './parser'
4
4
import { debounce , throttle } from './throttle'
5
5
import onError from '../sentry/onError'
6
- import displayOutput from './output'
6
+ import { clearOutput , displayOutput } from './output'
7
7
8
8
export interface Payload {
9
9
stepId : string
@@ -68,6 +68,7 @@ const createTestRunner = (config: TestRunnerConfig, callbacks: Callbacks) => {
68
68
69
69
// success!
70
70
if ( tap . ok ) {
71
+ clearOutput ( )
71
72
callbacks . onSuccess ( payload )
72
73
if ( onSuccess ) {
73
74
onSuccess ( )
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ const getOutputChannel = (name: string): vscode.OutputChannel => {
9
9
return channel
10
10
}
11
11
12
- const outputChannelName = 'TEST_OUTPUT '
12
+ const outputChannelName = 'CodeRoad Output '
13
13
14
14
const parseOutput = ( text : string ) : string => {
15
15
let result = ''
@@ -21,11 +21,17 @@ const parseOutput = (text: string): string => {
21
21
return result
22
22
}
23
23
24
- const displayOutput = ( text : string ) => {
24
+ export const displayOutput = ( text : string ) => {
25
25
const channel = getOutputChannel ( outputChannelName )
26
+ channel . clear ( )
26
27
channel . show ( true )
27
28
const output = parseOutput ( text )
28
29
channel . append ( output )
29
30
}
30
31
31
- export default displayOutput
32
+ export const clearOutput = ( ) => {
33
+ const channel = getOutputChannel ( outputChannelName )
34
+ channel . show ( false )
35
+ channel . clear ( )
36
+ channel . hide ( )
37
+ }
0 commit comments