From a65a81f167df7163befff5c9a18941bd8aa3ec40 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 5 Jan 2024 17:24:47 -0600 Subject: [PATCH] Update more snapshots --- .../src/query/tests/defaultSerializeQueryArgs.test.ts | 8 ++++---- .../tests/serializableStateInvariantMiddleware.test.ts | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/toolkit/src/query/tests/defaultSerializeQueryArgs.test.ts b/packages/toolkit/src/query/tests/defaultSerializeQueryArgs.test.ts index 9ec8a07dd7..45bd57cbb8 100644 --- a/packages/toolkit/src/query/tests/defaultSerializeQueryArgs.test.ts +++ b/packages/toolkit/src/query/tests/defaultSerializeQueryArgs.test.ts @@ -10,7 +10,7 @@ test('string arg', () => { endpointName, queryArgs: 'arg', }) - ).toMatchInlineSnapshot(`"test(\\"arg\\")"`) + ).toMatchInlineSnapshot(`"test("arg")"`) }) test('number arg', () => { @@ -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', () => { @@ -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"}})"` ) }) @@ -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}}})"` ) }) diff --git a/packages/toolkit/src/tests/serializableStateInvariantMiddleware.test.ts b/packages/toolkit/src/tests/serializableStateInvariantMiddleware.test.ts index 60e4e3b5a3..d9413671ed 100644 --- a/packages/toolkit/src/tests/serializableStateInvariantMiddleware.test.ts +++ b/packages/toolkit/src/tests/serializableStateInvariantMiddleware.test.ts @@ -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)" @@ -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)"