@@ -70,9 +70,9 @@ suite('Debugging - Banner', () => {
70
70
browser . verifyAll ( ) ;
71
71
} ) ;
72
72
test ( 'Increment Debugger Launch Counter when debug session starts' , async ( ) => {
73
- let onDidStartDebugSessionCb : ( e : DebugSession ) => Promise < void > ;
74
- debugService . setup ( d => d . onDidStartDebugSession ( typemoq . It . isAny ( ) ) )
75
- . callback ( cb => onDidStartDebugSessionCb = cb )
73
+ let onDidTerminateDebugSessionCb : ( e : DebugSession ) => Promise < void > ;
74
+ debugService . setup ( d => d . onDidTerminateDebugSession ( typemoq . It . isAny ( ) ) )
75
+ . callback ( cb => onDidTerminateDebugSessionCb = cb )
76
76
. verifiable ( typemoq . Times . once ( ) ) ;
77
77
78
78
const debuggerLaunchCounter = 1234 ;
@@ -84,15 +84,15 @@ suite('Debugging - Banner', () => {
84
84
. verifiable ( typemoq . Times . atLeastOnce ( ) ) ;
85
85
86
86
banner . initialize ( ) ;
87
- await onDidStartDebugSessionCb ! ( { type : ExperimentalDebuggerType } as any ) ;
87
+ await onDidTerminateDebugSessionCb ! ( { type : ExperimentalDebuggerType } as any ) ;
88
88
89
89
launchCounterState . verifyAll ( ) ;
90
90
browser . verifyAll ( ) ;
91
91
debugService . verifyAll ( ) ;
92
92
showBannerState . verifyAll ( ) ;
93
93
} ) ;
94
94
test ( 'Do not Increment Debugger Launch Counter when debug session starts and Banner is disabled' , async ( ) => {
95
- debugService . setup ( d => d . onDidStartDebugSession ( typemoq . It . isAny ( ) ) )
95
+ debugService . setup ( d => d . onDidTerminateDebugSession ( typemoq . It . isAny ( ) ) )
96
96
. verifiable ( typemoq . Times . never ( ) ) ;
97
97
98
98
const debuggerLaunchCounter = 1234 ;
@@ -147,11 +147,11 @@ suite('Debugging - Banner', () => {
147
147
launchThresholdCounterState . verifyAll ( ) ;
148
148
} ) ;
149
149
test ( 'showBanner must be invoked when shouldShowBanner returns true' , async ( ) => {
150
- let onDidStartDebugSessionCb : ( e : DebugSession ) => Promise < void > ;
150
+ let onDidTerminateDebugSessionCb : ( e : DebugSession ) => Promise < void > ;
151
151
const currentLaunchCounter = 50 ;
152
152
153
- debugService . setup ( d => d . onDidStartDebugSession ( typemoq . It . isAny ( ) ) )
154
- . callback ( cb => onDidStartDebugSessionCb = cb )
153
+ debugService . setup ( d => d . onDidTerminateDebugSession ( typemoq . It . isAny ( ) ) )
154
+ . callback ( cb => onDidTerminateDebugSessionCb = cb )
155
155
. verifiable ( typemoq . Times . atLeastOnce ( ) ) ;
156
156
showBannerState . setup ( s => s . value ) . returns ( ( ) => true )
157
157
. verifiable ( typemoq . Times . atLeastOnce ( ) ) ;
@@ -166,19 +166,19 @@ suite('Debugging - Banner', () => {
166
166
appShell . setup ( a => a . showInformationMessage ( typemoq . It . isValue ( message ) , typemoq . It . isValue ( yes ) , typemoq . It . isValue ( no ) ) )
167
167
. verifiable ( typemoq . Times . once ( ) ) ;
168
168
banner . initialize ( ) ;
169
- await onDidStartDebugSessionCb ! ( { type : ExperimentalDebuggerType } as any ) ;
169
+ await onDidTerminateDebugSessionCb ! ( { type : ExperimentalDebuggerType } as any ) ;
170
170
171
171
appShell . verifyAll ( ) ;
172
172
showBannerState . verifyAll ( ) ;
173
173
launchCounterState . verifyAll ( ) ;
174
174
launchThresholdCounterState . verifyAll ( ) ;
175
175
} ) ;
176
176
test ( 'showBanner must not be invoked the second time after dismissing the message' , async ( ) => {
177
- let onDidStartDebugSessionCb : ( e : DebugSession ) => Promise < void > ;
177
+ let onDidTerminateDebugSessionCb : ( e : DebugSession ) => Promise < void > ;
178
178
let currentLaunchCounter = 50 ;
179
179
180
- debugService . setup ( d => d . onDidStartDebugSession ( typemoq . It . isAny ( ) ) )
181
- . callback ( cb => onDidStartDebugSessionCb = cb )
180
+ debugService . setup ( d => d . onDidTerminateDebugSession ( typemoq . It . isAny ( ) ) )
181
+ . callback ( cb => onDidTerminateDebugSessionCb = cb )
182
182
. verifiable ( typemoq . Times . atLeastOnce ( ) ) ;
183
183
showBannerState . setup ( s => s . value ) . returns ( ( ) => true )
184
184
. verifiable ( typemoq . Times . atLeastOnce ( ) ) ;
@@ -193,10 +193,10 @@ suite('Debugging - Banner', () => {
193
193
. returns ( ( ) => Promise . resolve ( undefined ) )
194
194
. verifiable ( typemoq . Times . once ( ) ) ;
195
195
banner . initialize ( ) ;
196
- await onDidStartDebugSessionCb ! ( { type : ExperimentalDebuggerType } as any ) ;
197
- await onDidStartDebugSessionCb ! ( { type : ExperimentalDebuggerType } as any ) ;
198
- await onDidStartDebugSessionCb ! ( { type : ExperimentalDebuggerType } as any ) ;
199
- await onDidStartDebugSessionCb ! ( { type : ExperimentalDebuggerType } as any ) ;
196
+ await onDidTerminateDebugSessionCb ! ( { type : ExperimentalDebuggerType } as any ) ;
197
+ await onDidTerminateDebugSessionCb ! ( { type : ExperimentalDebuggerType } as any ) ;
198
+ await onDidTerminateDebugSessionCb ! ( { type : ExperimentalDebuggerType } as any ) ;
199
+ await onDidTerminateDebugSessionCb ! ( { type : ExperimentalDebuggerType } as any ) ;
200
200
201
201
appShell . verifyAll ( ) ;
202
202
showBannerState . verifyAll ( ) ;
0 commit comments