Skip to content

Commit

Permalink
fix: Fix more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
janjakubnanista committed Feb 14, 2024
1 parent 232301f commit 0769160
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
6 changes: 3 additions & 3 deletions packages/devtools-evm-hardhat/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ import './src/tasks'
const config: HardhatUserConfig = {
networks: {
'ethereum-mainnet': {
url: 'no:///way',
url: 'http://nonexistent.url',
saveDeployments: false,
eid: EndpointId.ETHEREUM_V2_MAINNET,
},
'ethereum-testnet': {
url: 'no:///way',
url: 'http://nonexistent.url',
saveDeployments: false,
eid: EndpointId.ETHEREUM_TESTNET,
},
'bsc-testnet': {
url: 'no:///way',
url: 'http://nonexistent.url',
saveDeployments: false,
accounts: {
mnemonic: 'test test test test test test test test test test test junk',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ describe('omnigraph/contracts', () => {
expect(connectedOmniContract.eid).toBe(point.eid)
expect(connectedOmniContract.contract).not.toBe(contract)
expect(connectedOmniContract.contract).toBeInstanceOf(BaseContract)
expect(connectedOmniContract.contract.provider).toBe(provider)
expect(connectedOmniContract.contract.runner).toBe(provider)
})
)
})
Expand Down
7 changes: 1 addition & 6 deletions packages/devtools-evm-hardhat/test/provider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,7 @@ describe('provider', () => {
jest.spyOn(env.network.provider, 'send').mockResolvedValue('sent')
expect(await provider.send('dummy', [])).toBe('sent')

// Ethers has this ugly habit of importing files here and there,
// firing RPC requests and all.
//
// If we don't wait for the provider to be ready, jest will complain
// about requests being made after test teardown
await provider.ready
provider.destroy()
})
})
})

0 comments on commit 0769160

Please sign in to comment.