Skip to content

Commit a65a81f

Browse files
committed
Update more snapshots
1 parent 25d7c36 commit a65a81f

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

packages/toolkit/src/query/tests/defaultSerializeQueryArgs.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ test('string arg', () => {
1010
endpointName,
1111
queryArgs: 'arg',
1212
})
13-
).toMatchInlineSnapshot(`"test(\\"arg\\")"`)
13+
).toMatchInlineSnapshot(`"test("arg")"`)
1414
})
1515

1616
test('number arg', () => {
@@ -30,7 +30,7 @@ test('simple object arg is sorted', () => {
3030
endpointName,
3131
queryArgs: { name: 'arg', age: 5 },
3232
})
33-
).toMatchInlineSnapshot(`"test({\\"age\\":5,\\"name\\":\\"arg\\"})"`)
33+
).toMatchInlineSnapshot(`"test({"age":5,"name":"arg"})"`)
3434
})
3535

3636
test('nested object arg is sorted recursively', () => {
@@ -41,7 +41,7 @@ test('nested object arg is sorted recursively', () => {
4141
queryArgs: { name: { last: 'Split', first: 'Banana' }, age: 5 },
4242
})
4343
).toMatchInlineSnapshot(
44-
`"test({\\"age\\":5,\\"name\\":{\\"first\\":\\"Banana\\",\\"last\\":\\"Split\\"}})"`
44+
`"test({"age":5,"name":{"first":"Banana","last":"Split"}})"`
4545
)
4646
})
4747

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

packages/toolkit/src/tests/serializableStateInvariantMiddleware.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ describe('serializableStateInvariantMiddleware', () => {
112112
expect(getLog().log).toMatchInlineSnapshot(`
113113
"A non-serializable value was detected in an action, in the path: \`payload\`. Value: Symbol(SOME_CONSTANT)
114114
Take a look at the logic that dispatched this action: Object {
115-
\\"payload\\": Symbol(SOME_CONSTANT),
116-
\\"type\\": \\"an-action\\",
115+
"payload": Symbol(SOME_CONSTANT),
116+
"type": "an-action",
117117
}
118118
(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)
119119
(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)"
@@ -369,10 +369,10 @@ describe('serializableStateInvariantMiddleware', () => {
369369
expect(getLog().log).toMatchInlineSnapshot(`
370370
"A non-serializable value was detected in an action, in the path: \`meta.arg\`. Value: Map {}
371371
Take a look at the logic that dispatched this action: Object {
372-
\\"meta\\": Object {
373-
\\"arg\\": Map {},
372+
"meta": Object {
373+
"arg": Map {},
374374
},
375-
\\"type\\": \\"test\\",
375+
"type": "test",
376376
}
377377
(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)
378378
(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)"

0 commit comments

Comments
 (0)