Skip to content

Commit

Permalink
chore: add onConnect to test mocks
Browse files Browse the repository at this point in the history
  • Loading branch information
tomiir committed Sep 19, 2024
1 parent a93cdb9 commit b7af2b3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/adapters/ethers/src/tests/mocks/AuthConnector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const mockAuthConnector = {
onRpcSuccess: vi.fn(),
onNotConnected: vi.fn(),
onIsConnected: vi.fn(),
onConnect: vi.fn(),
onSetPreferredAccount: vi.fn(),
connect: vi.fn().mockResolvedValue({
address: '0x1234567890123456789012345678901234567890',
Expand Down
1 change: 1 addition & 0 deletions packages/adapters/ethers5/src/tests/mocks/AuthConnector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const mockAuthConnector = {
onRpcSuccess: vi.fn(),
onNotConnected: vi.fn(),
onIsConnected: vi.fn(),
onConnect: vi.fn(),
onSetPreferredAccount: vi.fn(),
connect: vi.fn().mockResolvedValue({
address: '0x1234567890123456789012345678901234567890',
Expand Down
1 change: 1 addition & 0 deletions packages/adapters/solana/src/tests/mocks/AuthConnector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export const mockAuthConnector = {
onRpcRequest: vi.fn(),
onRpcError: vi.fn(),
onRpcSuccess: vi.fn(),
onConnect: vi.fn(),
onNotConnected: vi.fn(),
onIsConnected: vi.fn(),
onSetPreferredAccount: vi.fn(),
Expand Down
5 changes: 3 additions & 2 deletions packages/adapters/wagmi/src/tests/client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ describe('Wagmi Client', () => {
expect(mockAppKit.addConnector).toHaveBeenCalledWith({
id: ConstantsUtil.AUTH_CONNECTOR_ID,
type: 'AUTH',
name: 'Auth',
name: 'w3mAuth',
provider: 'mockProvider',
chain: 'eip155'
})
Expand All @@ -438,7 +438,8 @@ describe('Wagmi Client', () => {
onIsConnected: vi.fn(),
onGetSmartAccountEnabledNetworks: vi.fn(),
onSetPreferredAccount: vi.fn(),
rejectRpcRequests: vi.fn()
rejectRpcRequests: vi.fn(),
onConnect: vi.fn()
}
mockConnector = {
getProvider: vi.fn().mockResolvedValue(mockProvider)
Expand Down

0 comments on commit b7af2b3

Please sign in to comment.