Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
jxom committed Aug 31, 2024
1 parent b2c1645 commit 7ba04a0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/clients/createClient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -578,10 +578,8 @@ describe('extends', () => {

test('action composition', async () => {
const calls: string[] = []
const extended = createClient({
chain: localhost,
transport: http(),
})
const extended = anvilMainnet
.getClient()
.extend((client) => ({
async getChainId() {
calls.push('first')
Expand All @@ -601,7 +599,7 @@ describe('extends', () => {
},
}))

expect(await extended.getChainId()).toBe(localhost.id)
expect(await extended.getChainId()).toBe(anvilMainnet.chain.id)
expect(calls).toEqual(['third', 'second', 'first'])
})
})

0 comments on commit 7ba04a0

Please sign in to comment.