@@ -7,10 +7,10 @@ import assert from 'assert'
77import * as sinon from 'sinon'
88import * as path from 'path'
99import { AuthUtil , amazonQScopes } from 'aws-core-vscode/codewhisperer'
10- import { createTestAuthUtil } from 'aws-core-vscode/test'
10+ import { createTestAuthUtil , TestFolder } from 'aws-core-vscode/test'
1111import { constants , cache } from 'aws-core-vscode/auth'
1212import { auth2 } from 'aws-core-vscode/auth'
13- import { mementoUtils , makeTemporaryToolkitFolder , tryRemoveFolder , fs } from 'aws-core-vscode/shared'
13+ import { mementoUtils , fs } from 'aws-core-vscode/shared'
1414
1515describe ( 'AuthUtil' , async function ( ) {
1616 let auth : any
@@ -211,12 +211,13 @@ describe('AuthUtil', async function () {
211211 connectionState : 'valid' ,
212212 } ,
213213 }
214+
214215 beforeEach ( async function ( ) {
215216 memento = {
216217 get : sinon . stub ( ) ,
217218 update : sinon . stub ( ) . resolves ( ) ,
218219 }
219- cacheDir = await makeTemporaryToolkitFolder ( )
220+ cacheDir = ( await TestFolder . create ( ) ) . path
220221
221222 sinon . stub ( mementoUtils , 'getEnvironmentSpecificMemento' ) . returns ( memento )
222223 sinon . stub ( cache , 'getCacheDir' ) . returns ( cacheDir )
@@ -237,7 +238,6 @@ describe('AuthUtil', async function () {
237238 } )
238239
239240 afterEach ( async function ( ) {
240- await Promise . all ( [ tryRemoveFolder ( cacheDir ) ] )
241241 sinon . restore ( )
242242 } )
243243
0 commit comments