Skip to content

Commit

Permalink
Fix/flaky test (#5113)
Browse files Browse the repository at this point in the history
* Skip useStake preview test

* Bump happy-dom and override its fetch with cross-fetch

* Unskip test
  • Loading branch information
agualis authored Jan 18, 2024
1 parent d640e2c commit 047dc01
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
"ethereumjs-util": "^7.0.7",
"events": "^3.3.0",
"feather-icons": "^4.28.0",
"happy-dom": "^12.10.3",
"happy-dom": "^13.1.4",
"husky": "^8.0.0",
"jest-extended": "^3.2.4",
"json-to-graphql-query": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/providers/cross-chain-sync.provider.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ test('Calculates L2 network balances', async () => {
`);
});

test.skip('Synchronizes Arbitrum', async () => {
test('Synchronizes Arbitrum', async () => {
mockOmniEscrowLocks([]);
const { sync } = await mountCrossChainSync();

Expand Down
4 changes: 4 additions & 0 deletions tests/vitest/setup-msw.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { server } from '@tests/msw/server';
import { fetch } from 'cross-fetch';

// By default, our setup would use happy-dom fetch() implementation which is not 100% compatible with MSW
global.fetch = fetch;

// MSW SETUP
// Establish API mocking before all tests.
Expand Down

1 comment on commit 047dc01

@vercel
Copy link

@vercel vercel bot commented on 047dc01 Jan 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.