diff --git a/packages/core/__e2e__/token-manager.test.js b/packages/core/__e2e__/token-manager.test.js index 013aaf9be..e507bd72f 100644 --- a/packages/core/__e2e__/token-manager.test.js +++ b/packages/core/__e2e__/token-manager.test.js @@ -22,7 +22,8 @@ import StorageInterface from "../__mocks__/storage.mock"; import { login } from "./utils"; test("refresh token concurrently", async () => { - const db = new DB(StorageInterface); + const db = new DB(); + db.setup(StorageInterface); await db.init(); await expect(login(db)).resolves.not.toThrow(); @@ -41,7 +42,8 @@ test("refresh token concurrently", async () => { }, 30000); test("refresh token using the same refresh_token multiple time", async () => { - const db = new DB(StorageInterface); + const db = new DB(); + db.setup(StorageInterface); await db.init(); await expect(login(db)).resolves.not.toThrow(); diff --git a/packages/core/__tests__/db.test.js b/packages/core/__tests__/db.test.js index dffb98c92..99a2a26c7 100644 --- a/packages/core/__tests__/db.test.js +++ b/packages/core/__tests__/db.test.js @@ -22,7 +22,8 @@ import Constants from "../utils/constants"; import StorageInterface from "../__mocks__/storage.mock"; test("db.host should change HOST", () => { - const db = new DB(StorageInterface); + const db = new DB(); + db.setup(StorageInterface); db.host({ API_HOST: "hello world" }); expect(Constants.API_HOST).toBe("hello world"); }); diff --git a/packages/core/__tests__/utils/index.js b/packages/core/__tests__/utils/index.js index 568d042c6..848189bca 100644 --- a/packages/core/__tests__/utils/index.js +++ b/packages/core/__tests__/utils/index.js @@ -37,7 +37,8 @@ const TEST_NOTEBOOK2 = { }; function databaseTest() { - let db = new DB(StorageInterface, null, FS, Compressor); + let db = new DB(); + db.setup(StorageInterface, null, FS, Compressor); return db.init().then(() => db); }