Skip to content

Commit c1c6f40

Browse files
committed
test: fix test assertion
1 parent a802b1a commit c1c6f40

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

packages/thirdweb/src/wallets/connection/autoConnect.test.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
import { beforeEach, describe, expect, it, vi } from "vitest";
2-
import { MockStorage } from "~test/mocks/storage.js";
32
import { TEST_CLIENT } from "~test/test-clients.js";
43
import { TEST_ACCOUNT_A } from "~test/test-wallets.js";
54
import { createWalletAdapter } from "../../adapters/wallet-adapter.js";
65
import { ethereum } from "../../chains/chain-definitions/ethereum.js";
76
import { webLocalStorage } from "../../utils/storage/webStorage.js";
87
import { createWallet } from "../create-wallet.js";
98
import { getInstalledWalletProviders } from "../injected/mipdStore.js";
10-
import { createConnectionManager } from "../manager/index.js";
119
import { autoConnect } from "./autoConnect.js";
1210
import { autoConnectCore } from "./autoConnectCore.js";
1311

@@ -24,8 +22,6 @@ describe("autoConnect", () => {
2422
onDisconnect: () => {},
2523
switchChain: () => {},
2624
});
27-
const mockStorage = new MockStorage();
28-
const mockWalletManager = createConnectionManager(mockStorage);
2925

3026
beforeEach(() => {
3127
vi.clearAllMocks();
@@ -38,27 +34,24 @@ describe("autoConnect", () => {
3834
const result = await autoConnect({
3935
client: TEST_CLIENT,
4036
wallets: [mockWallet],
41-
walletManager: mockWalletManager,
4237
});
4338

4439
expect(autoConnectCore).toHaveBeenCalledWith({
4540
storage: webLocalStorage,
4641
props: {
4742
client: TEST_CLIENT,
4843
wallets: [mockWallet],
49-
walletManager: mockWalletManager,
5044
},
5145
createWalletFn: createWallet,
5246
getInstalledWallets: expect.any(Function),
53-
manager: mockWalletManager,
47+
manager: expect.any(Object),
5448
});
5549
expect(result).toBe(true);
5650
});
5751

5852
it("should use default wallets when no wallets are provided", async () => {
5953
await autoConnect({
6054
wallets: [],
61-
walletManager: mockWalletManager,
6255
client: TEST_CLIENT,
6356
});
6457

@@ -67,7 +60,6 @@ describe("autoConnect", () => {
6760
props: {
6861
client: TEST_CLIENT,
6962
wallets: [],
70-
walletManager: mockWalletManager,
7163
},
7264
}),
7365
);

0 commit comments

Comments
 (0)