@@ -158,7 +158,6 @@ suite('Python envs locator - Environments Collection', async () => {
158
158
} ) ,
159
159
) ;
160
160
161
- sinon . assert . calledWithExactly ( reportInterpretersChangedStub , [ { path : undefined , type : 'clear-all' } ] ) ;
162
161
envs . forEach ( ( e ) => {
163
162
sinon . assert . calledWithExactly ( reportInterpretersChangedStub , [
164
163
{
@@ -167,9 +166,7 @@ suite('Python envs locator - Environments Collection', async () => {
167
166
} ,
168
167
] ) ;
169
168
} ) ;
170
-
171
- // One for each environment and one for global 'clear-all' event.
172
- sinon . assert . callCount ( reportInterpretersChangedStub , envs . length + 1 ) ;
169
+ sinon . assert . callCount ( reportInterpretersChangedStub , envs . length ) ;
173
170
} ) ;
174
171
175
172
test ( 'triggerRefresh() refreshes the collection and storage with any new environments' , async ( ) => {
@@ -204,7 +201,6 @@ suite('Python envs locator - Environments Collection', async () => {
204
201
assertEnvsEqual ( storage , expected ) ;
205
202
206
203
const eventData = [
207
- { path : undefined , type : 'clear-all' } ,
208
204
{
209
205
path : path . join ( TEST_LAYOUT_ROOT , 'doesNotExist' ) ,
210
206
type : 'remove' ,
@@ -307,7 +303,6 @@ suite('Python envs locator - Environments Collection', async () => {
307
303
assertEnvsEqual ( envs , expected ) ;
308
304
309
305
const eventData = [
310
- { path : undefined , type : 'clear-all' } ,
311
306
{
312
307
path : path . join ( TEST_LAYOUT_ROOT , 'doesNotExist' ) ,
313
308
type : 'remove' ,
@@ -404,7 +399,6 @@ suite('Python envs locator - Environments Collection', async () => {
404
399
) ;
405
400
406
401
const eventData = [
407
- { path : undefined , type : 'clear-all' } ,
408
402
{
409
403
path : path . join ( TEST_LAYOUT_ROOT , 'doesNotExist' ) ,
410
404
type : 'remove' ,
@@ -447,7 +441,6 @@ suite('Python envs locator - Environments Collection', async () => {
447
441
expect ( isFired ) . to . equal ( true ) ;
448
442
449
443
const eventData = [
450
- { path : undefined , type : 'clear-all' } ,
451
444
{
452
445
path : path . join ( TEST_LAYOUT_ROOT , 'conda1' , 'python.exe' ) ,
453
446
type : 'add' ,
@@ -614,12 +607,6 @@ suite('Python envs locator - Environments Collection', async () => {
614
607
downstreamEvents . sort ( ( a , b ) => ( a . type && b . type ? a . type ?. localeCompare ( b . type ) : 0 ) ) ,
615
608
) ;
616
609
617
- [
618
- { path : undefined , type : 'clear-all' } ,
619
- { path : undefined , type : 'clear-all' } ,
620
- ] . forEach ( ( d ) => {
621
- sinon . assert . calledWithExactly ( reportInterpretersChangedStub , [ d ] ) ;
622
- } ) ;
623
- sinon . assert . calledTwice ( reportInterpretersChangedStub ) ;
610
+ sinon . assert . notCalled ( reportInterpretersChangedStub ) ;
624
611
} ) ;
625
612
} ) ;
0 commit comments