1+ import assert from 'assert' ;
12import * as path from 'path' ;
23import * as sinon from 'sinon' ;
34import * as typmoq from 'typemoq' ;
4- import * as wapi from '../../../common/workspace.apis' ;
5- import * as winapi from '../../../common/window.apis' ;
6- import { PythonProjectManager } from '../../../internal.api' ;
7- import { createDeferred } from '../../../common/utils/deferred' ;
8- import { AutoFindProjects } from '../../../features/creators/autoFindProjects' ;
9- import assert from 'assert' ;
105import { Uri } from 'vscode' ;
116import { PythonProject } from '../../../api' ;
12- import { sleep } from '../../../common/utils/asyncUtils' ;
7+ import { timeout } from '../../../common/utils/asyncUtils' ;
8+ import { createDeferred } from '../../../common/utils/deferred' ;
9+ import * as winapi from '../../../common/window.apis' ;
10+ import * as wapi from '../../../common/workspace.apis' ;
11+ import { AutoFindProjects } from '../../../features/creators/autoFindProjects' ;
12+ import { PythonProjectManager } from '../../../internal.api' ;
1313
1414suite ( 'Auto Find Project tests' , ( ) => {
1515 let findFilesStub : sinon . SinonStub ;
@@ -45,7 +45,7 @@ suite('Auto Find Project tests', () => {
4545 const result = await autoFindProjects . create ( ) ;
4646 assert . equal ( result , undefined , 'Result should be undefined' ) ;
4747
48- await Promise . race ( [ deferred . promise , sleep ( 100 ) ] ) ;
48+ await Promise . race ( [ deferred . promise , timeout ( 100 ) ] ) ;
4949 assert . ok ( errorShown , 'Error message should have been shown' ) ;
5050 } ) ;
5151
@@ -64,7 +64,7 @@ suite('Auto Find Project tests', () => {
6464 const result = await autoFindProjects . create ( ) ;
6565 assert . equal ( result , undefined , 'Result should be undefined' ) ;
6666
67- await Promise . race ( [ deferred . promise , sleep ( 100 ) ] ) ;
67+ await Promise . race ( [ deferred . promise , timeout ( 100 ) ] ) ;
6868 assert . ok ( errorShown , 'Error message should have been shown' ) ;
6969 } ) ;
7070
0 commit comments