@@ -386,6 +386,7 @@ describe('SnippetManager', () => {
386
386
} ) ;
387
387
388
388
it ( 'will fail when the index URI is inaccessible' , async ( ) => {
389
+ await snippetManager . inflightFetchIndexPromise ;
389
390
try {
390
391
indexURL = `${ baseURL } /404` ;
391
392
await snippetManager . runSnippetCommand ( [ 'refresh' ] ) ;
@@ -396,6 +397,7 @@ describe('SnippetManager', () => {
396
397
} ) ;
397
398
398
399
it ( 'will fail when the index URI returns data in the wrong format (not .br)' , async ( ) => {
400
+ await snippetManager . inflightFetchIndexPromise ;
399
401
try {
400
402
indexURL = `${ baseURL } /notindexfile` ;
401
403
await snippetManager . runSnippetCommand ( [ 'refresh' ] ) ;
@@ -406,6 +408,7 @@ describe('SnippetManager', () => {
406
408
} ) ;
407
409
408
410
it ( 'will fail when the index URI returns data in the wrong format (not .bson.br)' , async ( ) => {
411
+ await snippetManager . inflightFetchIndexPromise ;
409
412
try {
410
413
indexURL = `${ baseURL } /notindexfile2` ;
411
414
await snippetManager . runSnippetCommand ( [ 'refresh' ] ) ;
@@ -537,13 +540,15 @@ describe('SnippetManager', () => {
537
540
} ) ;
538
541
539
542
it ( 'can install from a tarball' , async ( ) => {
543
+ await snippetManager . inflightFetchIndexPromise ;
540
544
indexURL = `${ baseURL } /index.bson.br;${ baseURL } /index2.bson.br;` ;
541
545
( evaluationListener . onPrompt as any ) . resolves ( 'yes' ) ;
542
546
await snippetManager . runSnippetCommand ( [ 'install' , 'tarballed-example' ] ) ;
543
547
expect ( contextObject . load ) . to . have . been . calledWith ( path . resolve ( installdir , 'node_modules' , 'tarballed-example-snippet-name' , 'index.js' ) ) ;
544
548
} ) ;
545
549
546
550
it ( 'reports back errors if npm fails' , async ( ) => {
551
+ await snippetManager . inflightFetchIndexPromise ;
547
552
indexURL = `${ baseURL } /index.bson.br;${ baseURL } /index2.bson.br;` ;
548
553
( evaluationListener . onPrompt as any ) . resolves ( 'yes' ) ;
549
554
try {
@@ -724,6 +729,7 @@ describe('SnippetManager', () => {
724
729
725
730
describe ( 'interruption support' , ( ) => {
726
731
it ( 'commands methods like load-all perform interruption checkpoints' , async ( ) => {
732
+ await snippetManager . inflightFetchIndexPromise ;
727
733
indexURL = `${ baseURL } /index.bson.br;${ baseURL } /index2.bson.br;` ;
728
734
await snippetManager . runSnippetCommand ( [ 'refresh' ] ) ;
729
735
0 commit comments