We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc83405 commit 86206f2Copy full SHA for 86206f2
packages/core/src/test/testAuthUtil.ts
@@ -10,9 +10,6 @@ import { LanguageClientAuth } from '../auth/auth2'
10
import { AuthUtil } from '../codewhisperer/util/authUtil'
11
12
export async function createTestAuthUtil() {
13
- sinon.restore()
14
- AuthUtil.destroy()
15
-
16
const encryptionKey = crypto.randomBytes(32)
17
18
const jwe = await new jose.CompactEncrypt(new TextEncoder().encode(JSON.stringify({ your: 'mock data' })))
@@ -42,5 +39,8 @@ export async function createTestAuthUtil() {
42
39
encryptionKey,
43
40
}
44
41
+ // Since AuthUtil is a singleton, we want to remove an existing instance before setting up a new one
+ AuthUtil.destroy()
+
45
AuthUtil.create(mockLspAuth as LanguageClientAuth)
46
0 commit comments