tests: fix memory leaks (#2389)
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
/* eslint-disable no-unused-expressions */
|
||||
/* eslint-disable no-undef */
|
||||
|
||||
import FakeWebCrypto from './fake_web_crypto.js'
|
||||
import { AppContext } from './AppContext.js'
|
||||
import { VaultsContext } from './VaultsContext.js'
|
||||
@@ -63,6 +62,10 @@ export async function createVaultsContextWithRealCrypto(identifier) {
|
||||
return createVaultsContext({ identifier, crypto: new SNWebCrypto() })
|
||||
}
|
||||
|
||||
export async function createVaultsContextWithFakeCrypto(identifier) {
|
||||
return createVaultsContext({ identifier, crypto: new FakeWebCrypto() })
|
||||
}
|
||||
|
||||
export async function createVaultsContext({ identifier, crypto, email, password, host } = {}) {
|
||||
const context = new VaultsContext({ identifier, crypto, email, password, host })
|
||||
await context.initialize()
|
||||
|
||||
Reference in New Issue
Block a user