Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
81f9aec1
Unverified
Commit
81f9aec1
authored
Oct 17, 2023
by
Will Cory
Committed by
GitHub
Oct 17, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7718 from ethereum-optimism/10-17-chore_Disable_low_value_test
chore: Disable low value test
parents
2b18babb
067a6f5c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
88 deletions
+0
-88
react.spec.tsx
packages/contracts-ts/src/react.spec.tsx
+0
-88
No files found.
packages/contracts-ts/src/react.spec.tsx
deleted
100644 → 0
View file @
2b18babb
import
matchers
from
'
@testing-library/jest-dom/matchers
'
import
{
cleanup
,
waitFor
}
from
'
@testing-library/react
'
import
{
renderHook
}
from
'
@testing-library/react-hooks
'
import
{
afterEach
,
expect
,
test
}
from
'
vitest
'
import
{
useMintManagerRead
}
from
'
./react
'
import
{
configureChains
,
createConfig
,
WagmiConfig
}
from
'
wagmi
'
import
*
as
React
from
'
react
'
import
{
optimism
}
from
'
viem/chains
'
import
{
jsonRpcProvider
}
from
'
wagmi/providers/jsonRpc
'
expect
.
extend
(
matchers
)
afterEach
(()
=>
{
cleanup
()
})
const
{
publicClient
}
=
configureChains
(
[
optimism
],
[
jsonRpcProvider
({
rpc
:
()
=>
({
http
:
import
.
meta
.
env
.
VITE_RPC_URL_L2_MAINNET
??
'
https://mainnet.optimism.io
'
,
}),
}),
]
)
const
config
=
createConfig
({
publicClient
:
({
chainId
})
=>
publicClient
({
chainId
}),
})
const
blockNumber
=
BigInt
(
106806163
)
test
(
'
react hooks should work
'
,
async
()
=>
{
const
hook
=
renderHook
(
()
=>
useMintManagerRead
({
chainId
:
10
,
blockNumber
,
functionName
:
'
owner
'
}),
{
wrapper
:
({
children
})
=>
(
<
WagmiConfig
config=
{
config
}
>
{
children
}
</
WagmiConfig
>
),
}
)
await
waitFor
(()
=>
{
hook
.
rerender
()
if
(
hook
.
result
.
current
.
error
)
throw
hook
.
result
.
current
.
error
expect
(
hook
.
result
.
current
?.
data
).
toBeDefined
()
})
const
normalizedResult
=
{
...
hook
.
result
.
current
,
internal
:
{
...
hook
.
result
.
current
.
internal
,
dataUpdatedAt
:
'
SNAPSHOT_TEST_REMOVED!!!
'
,
},
}
expect
(
normalizedResult
).
toMatchInlineSnapshot
(
`
{
"data": "0x2A82Ae142b2e62Cb7D10b55E323ACB1Cab663a26",
"error": null,
"fetchStatus": "idle",
"internal": {
"dataUpdatedAt": "SNAPSHOT_TEST_REMOVED!!!",
"errorUpdatedAt": 0,
"failureCount": 0,
"isFetchedAfterMount": true,
"isLoadingError": false,
"isPaused": false,
"isPlaceholderData": false,
"isPreviousData": false,
"isRefetchError": false,
"isStale": true,
"remove": [Function],
},
"isError": false,
"isFetched": true,
"isFetchedAfterMount": true,
"isFetching": false,
"isIdle": false,
"isLoading": false,
"isRefetching": false,
"isSuccess": true,
"refetch": [Function],
"status": "success",
}
`
)
})
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment