Skip to content

Commit

Permalink
Update more snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
aryaemami59 committed Jan 5, 2024
1 parent 25d7c36 commit a65a81f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ test('string arg', () => {
endpointName,
queryArgs: 'arg',
})
).toMatchInlineSnapshot(`"test(\\"arg\\")"`)
).toMatchInlineSnapshot(`"test("arg")"`)
})

test('number arg', () => {
Expand All @@ -30,7 +30,7 @@ test('simple object arg is sorted', () => {
endpointName,
queryArgs: { name: 'arg', age: 5 },
})
).toMatchInlineSnapshot(`"test({\\"age\\":5,\\"name\\":\\"arg\\"})"`)
).toMatchInlineSnapshot(`"test({"age":5,"name":"arg"})"`)
})

test('nested object arg is sorted recursively', () => {
Expand All @@ -41,7 +41,7 @@ test('nested object arg is sorted recursively', () => {
queryArgs: { name: { last: 'Split', first: 'Banana' }, age: 5 },
})
).toMatchInlineSnapshot(
`"test({\\"age\\":5,\\"name\\":{\\"first\\":\\"Banana\\",\\"last\\":\\"Split\\"}})"`
`"test({"age":5,"name":{"first":"Banana","last":"Split"}})"`
)
})

Expand Down Expand Up @@ -70,7 +70,7 @@ test('Fully serializes a deeply nested object', () => {
queryArgs: nestedObj,
})
expect(res).toMatchInlineSnapshot(
`"test({\\"a\\":{\\"a1\\":{\\"a11\\":{\\"a111\\":1}}},\\"b\\":{\\"b1\\":{\\"b11\\":2},\\"b2\\":{\\"b21\\":3}}})"`
`"test({"a":{"a1":{"a11":{"a111":1}}},"b":{"b1":{"b11":2},"b2":{"b21":3}}})"`
)
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ describe('serializableStateInvariantMiddleware', () => {
expect(getLog().log).toMatchInlineSnapshot(`
"A non-serializable value was detected in an action, in the path: \`payload\`. Value: Symbol(SOME_CONSTANT)
Take a look at the logic that dispatched this action: Object {
\\"payload\\": Symbol(SOME_CONSTANT),
\\"type\\": \\"an-action\\",
"payload": Symbol(SOME_CONSTANT),
"type": "an-action",
}
(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)
(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)"
Expand Down Expand Up @@ -369,10 +369,10 @@ describe('serializableStateInvariantMiddleware', () => {
expect(getLog().log).toMatchInlineSnapshot(`
"A non-serializable value was detected in an action, in the path: \`meta.arg\`. Value: Map {}
Take a look at the logic that dispatched this action: Object {
\\"meta\\": Object {
\\"arg\\": Map {},
"meta": Object {
"arg": Map {},
},
\\"type\\": \\"test\\",
"type": "test",
}
(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)
(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)"
Expand Down

0 comments on commit a65a81f

Please sign in to comment.