Skip to content

Commit

Permalink
fix: Don't let JsonRpcProvider hang tests
Browse files Browse the repository at this point in the history
  • Loading branch information
janjakubnanista committed Dec 5, 2023
1 parent 365a830 commit 89b551e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/utils-evm/test/provider/factory.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ import { createProviderFactory } from '@/provider/factory'
import { endpointArbitrary } from '@layerzerolabs/test-utils'
import { JsonRpcProvider } from '@ethersproject/providers'

// We'll use the fake timers to work around the fact that JsonRpcProvider uses setTimeout
// to schedule a task in the queue in its constructor
jest.useFakeTimers()

describe('provider/factory', () => {
describe('createProviderFactory', () => {
const errorArbitrary = fc.anything()
Expand Down

0 comments on commit 89b551e

Please sign in to comment.