-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upgrade rooch-sdk package dependencies
- Loading branch information
Showing
11 changed files
with
5,166 additions
and
5,597 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
legacy-peer-deps = false | ||
auto-install-peers=true | ||
strict-peer-dependencies=false | ||
loglevel=error |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { useEffect } from 'react' | ||
import { beforeEach, describe, expect, it, vi } from 'vitest' | ||
import { renderHook, waitFor } from '@testing-library/react' | ||
import { renderHook, waitFor, act } from '@testing-library/react' | ||
import { | ||
ErrorValidateSessionIsExpired, | ||
JsonRpcError, | ||
|
@@ -77,7 +77,10 @@ describe('useDefaultClient', () => { | |
} | ||
|
||
const wrapper = createWalletProviderContextWrapper({}, mockClient) | ||
const { result } = renderHook(() => useTestHook(), { wrapper }) | ||
let result: any | ||
await act(async () => { | ||
result = renderHook(() => useTestHook(), { wrapper }) | ||
}) | ||
|
||
await waitFor(() => { | ||
expect(result.current.sessions).toHaveLength(2) | ||
Check failure on line 86 in sdk/typescript/rooch-sdk-kit/test/case/use-default-client.test.tsx
|
||
|
@@ -89,9 +92,12 @@ describe('useDefaultClient', () => { | |
return cachedCurrentSession!.getAuthKey() === s.getAuthKey() | ||
} | ||
|
||
await expect(result.current.triggerSessionExpiredError).rejects.toThrow( | ||
'[test] session expired', | ||
) | ||
await act(async () => { | ||
await expect(result.current.triggerSessionExpiredError()).rejects.toThrow( | ||
'[test] session expired', | ||
) | ||
}) | ||
|
||
expect(result.current.sessions).toHaveLength(1) | ||
expect(result.current.sessions.find(getMatchedSessionByAuthKey)).toBeUndefined() | ||
}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters