Skip to content

Commit

Permalink
add test for bigint in defaultSerializeQueryArgs
Browse files Browse the repository at this point in the history
  • Loading branch information
rkofman committed Apr 8, 2024
1 parent ae838b4 commit e22da96
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/toolkit/src/query/tests/defaultSerializeQueryArgs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ test('number arg', () => {
).toMatchInlineSnapshot(`"test(5)"`)
})

test('bigint arg has non-default serialization (intead of throwing)', () => {
expect(
defaultSerializeQueryArgs({
endpointDefinition,
endpointName,
queryArgs: BigInt(10),
}),
).toMatchInlineSnapshot(`"test({"$bigint":"10"})"`)
})

test('simple object arg is sorted', () => {
expect(
defaultSerializeQueryArgs({
Expand Down

0 comments on commit e22da96

Please sign in to comment.