Update jest escapeString config (#26140)

## Summary

In jest v29, snapshotFormat default to escapeString:
false(https://github.com/facebook/jest/pull/13036)

## How did you test this change?

ci green
This commit is contained in:
Ming Ye 2023-02-10 07:08:37 +08:00 committed by GitHub
parent 6ddcbd4f96
commit 35698311de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 242 additions and 243 deletions

View File

@ -2500,7 +2500,7 @@ describe('InspectedElement', () => {
Object {
"errors": Array [
Array [
"Warning: Each child in a list should have a unique \\"key\\" prop. See https://reactjs.org/link/warning-keys for more information.
"Warning: Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.
at Example",
1,
],

View File

@ -125,7 +125,7 @@ describe('profiling charts', () => {
"actualDuration": 0,
"didRender": true,
"id": 5,
"label": "Memo(Child) key=\\"third\\" (<0.1ms of <0.1ms)",
"label": "Memo(Child) key="third" (<0.1ms of <0.1ms)",
"name": "Memo(Child)",
"offset": 15,
"selfDuration": 0,
@ -135,7 +135,7 @@ describe('profiling charts', () => {
"actualDuration": 2,
"didRender": true,
"id": 4,
"label": "Memo(Child) key=\\"second\\" (2ms of 2ms)",
"label": "Memo(Child) key="second" (2ms of 2ms)",
"name": "Memo(Child)",
"offset": 13,
"selfDuration": 2,
@ -145,7 +145,7 @@ describe('profiling charts', () => {
"actualDuration": 3,
"didRender": true,
"id": 3,
"label": "Memo(Child) key=\\"first\\" (3ms of 3ms)",
"label": "Memo(Child) key="first" (3ms of 3ms)",
"name": "Memo(Child)",
"offset": 10,
"selfDuration": 3,
@ -176,7 +176,7 @@ describe('profiling charts', () => {
"actualDuration": 0,
"didRender": false,
"id": 5,
"label": "Memo(Child) key=\\"third\\"",
"label": "Memo(Child) key="third"",
"name": "Memo(Child)",
"offset": 15,
"selfDuration": 0,
@ -186,7 +186,7 @@ describe('profiling charts', () => {
"actualDuration": 0,
"didRender": false,
"id": 4,
"label": "Memo(Child) key=\\"second\\"",
"label": "Memo(Child) key="second"",
"name": "Memo(Child)",
"offset": 13,
"selfDuration": 0,
@ -196,7 +196,7 @@ describe('profiling charts', () => {
"actualDuration": 0,
"didRender": false,
"id": 3,
"label": "Memo(Child) key=\\"first\\"",
"label": "Memo(Child) key="first"",
"name": "Memo(Child)",
"offset": 10,
"selfDuration": 0,
@ -267,19 +267,19 @@ describe('profiling charts', () => {
},
Object {
"id": 3,
"label": "Memo(Child) (Memo) key=\\"first\\" (3ms)",
"label": "Memo(Child) (Memo) key="first" (3ms)",
"name": "Memo(Child)",
"value": 3,
},
Object {
"id": 4,
"label": "Memo(Child) (Memo) key=\\"second\\" (2ms)",
"label": "Memo(Child) (Memo) key="second" (2ms)",
"name": "Memo(Child)",
"value": 2,
},
Object {
"id": 5,
"label": "Memo(Child) (Memo) key=\\"third\\" (<0.1ms)",
"label": "Memo(Child) (Memo) key="third" (<0.1ms)",
"name": "Memo(Child)",
"value": 0,
},

View File

@ -94,16 +94,16 @@ describe('Store owners list', () => {
const rootID = store.getElementIDAtIndex(0);
expect(getFormattedOwnersList(rootID)).toMatchInlineSnapshot(`
" <Root>
<Intermediate key=\\"intermediate\\">
<Intermediate key="intermediate">
<Leaf>
<Leaf key=\\"leaf\\">"
<Leaf key="leaf">"
`);
const intermediateID = store.getElementIDAtIndex(1);
expect(getFormattedOwnersList(intermediateID)).toMatchInlineSnapshot(`
" ▾ <Intermediate key=\\"intermediate\\">
<Leaf key=\\"leaf\\">
<Wrapper key=\\"wrapper\\">"
" ▾ <Intermediate key="intermediate">
<Leaf key="leaf">
<Wrapper key="wrapper">"
`);
});
@ -217,9 +217,9 @@ describe('Store owners list', () => {
`);
expect(getFormattedOwnersList(rootID)).toMatchInlineSnapshot(`
" <Root>
<Leaf key=\\"A\\">
<Leaf key=\\"B\\">
<Leaf key=\\"C\\">"
<Leaf key="A">
<Leaf key="B">
<Leaf key="C">"
`);
act(() => legacyRender(<Root ascending={false} />, container));
@ -232,9 +232,9 @@ describe('Store owners list', () => {
`);
expect(getFormattedOwnersList(rootID)).toMatchInlineSnapshot(`
" <Root>
<Leaf key=\\"C\\">
<Leaf key=\\"B\\">
<Leaf key=\\"A\\">"
<Leaf key="C">
<Leaf key="B">
<Leaf key="A">"
`);
});
});

View File

@ -262,58 +262,58 @@ describe('StoreStressConcurrent', () => {
Array [
"[root]
<Root>
<A key=\\"a\\">",
<A key="a">",
"[root]
<Root>
<B key=\\"b\\">",
<B key="b">",
"[root]
<Root>
<C key=\\"c\\">",
<C key="c">",
"[root]
<Root>
<D key=\\"d\\">",
<D key="d">",
"[root]
<Root>
<E key=\\"e\\">",
<E key="e">",
"[root]
<Root>
<A key=\\"a\\">",
<A key="a">",
"[root]
<Root>
<B key=\\"b\\">",
<B key="b">",
"[root]
<Root>
<C key=\\"c\\">",
<C key="c">",
"[root]
<Root>
<D key=\\"d\\">",
<D key="d">",
"[root]
<Root>
<E key=\\"e\\">",
<E key="e">",
"[root]
<Root>
<A key=\\"a\\">
<B key=\\"b\\">",
<A key="a">
<B key="b">",
"[root]
<Root>
<B key=\\"b\\">
<A key=\\"a\\">",
<B key="b">
<A key="a">",
"[root]
<Root>
<B key=\\"b\\">
<C key=\\"c\\">",
<B key="b">
<C key="c">",
"[root]
<Root>
<C key=\\"c\\">
<B key=\\"b\\">",
<C key="c">
<B key="b">",
"[root]
<Root>
<A key=\\"a\\">
<C key=\\"c\\">",
<A key="a">
<C key="c">",
"[root]
<Root>
<C key=\\"c\\">
<A key=\\"a\\">",
<C key="c">
<A key="a">",
]
`);
@ -435,63 +435,63 @@ describe('StoreStressConcurrent', () => {
<Root>
<X>
<Suspense>
<A key=\\"a\\">
<A key="a">
<Y>",
"[root]
<Root>
<X>
<Suspense>
<A key=\\"a\\">
<A key="a">
<Y>",
"[root]
<Root>
<X>
<Suspense>
<A key=\\"a\\">
<B key=\\"b\\">
<C key=\\"c\\">
<A key="a">
<B key="b">
<C key="c">
<Y>",
"[root]
<Root>
<X>
<Suspense>
<C key=\\"c\\">
<B key=\\"b\\">
<A key=\\"a\\">
<C key="c">
<B key="b">
<A key="a">
<Y>",
"[root]
<Root>
<X>
<Suspense>
<C key=\\"c\\">
<A key=\\"a\\">
<C key="c">
<A key="a">
<Y>",
"[root]
<Root>
<X>
<Suspense>
<C key=\\"c\\">
<A key=\\"a\\">
<C key="c">
<A key="a">
<Y>",
"[root]
<Root>
<X>
<Suspense>
<C key=\\"c\\">
<A key=\\"a\\">
<C key="c">
<A key="a">
<Y>",
"[root]
<Root>
<X>
<Suspense>
<A key=\\"a\\">
<B key=\\"b\\">
<A key="a">
<B key="b">
<Y>",
"[root]
<Root>
<X>
<Suspense>
<A key=\\"a\\">
<A key="a">
<Y>",
"[root]
<Root>
@ -502,13 +502,13 @@ describe('StoreStressConcurrent', () => {
<Root>
<X>
<Suspense>
<B key=\\"b\\">
<B key="b">
<Y>",
"[root]
<Root>
<X>
<Suspense>
<A key=\\"a\\">
<A key="a">
<Y>",
]
`);
@ -956,7 +956,7 @@ describe('StoreStressConcurrent', () => {
<X>
<Suspense>
<MaybeSuspend>
<A key=\\"a\\">
<A key="a">
<Z>
<Y>",
"[root]
@ -964,7 +964,7 @@ describe('StoreStressConcurrent', () => {
<X>
<Suspense>
<MaybeSuspend>
<A key=\\"a\\">
<A key="a">
<Z>
<Y>",
"[root]
@ -972,9 +972,9 @@ describe('StoreStressConcurrent', () => {
<X>
<Suspense>
<MaybeSuspend>
<A key=\\"a\\">
<B key=\\"b\\">
<C key=\\"c\\">
<A key="a">
<B key="b">
<C key="c">
<Z>
<Y>",
"[root]
@ -982,9 +982,9 @@ describe('StoreStressConcurrent', () => {
<X>
<Suspense>
<MaybeSuspend>
<C key=\\"c\\">
<B key=\\"b\\">
<A key=\\"a\\">
<C key="c">
<B key="b">
<A key="a">
<Z>
<Y>",
"[root]
@ -992,8 +992,8 @@ describe('StoreStressConcurrent', () => {
<X>
<Suspense>
<MaybeSuspend>
<C key=\\"c\\">
<A key=\\"a\\">
<C key="c">
<A key="a">
<Z>
<Y>",
"[root]
@ -1001,8 +1001,8 @@ describe('StoreStressConcurrent', () => {
<X>
<Suspense>
<MaybeSuspend>
<C key=\\"c\\">
<A key=\\"a\\">
<C key="c">
<A key="a">
<Z>
<Y>",
"[root]
@ -1010,8 +1010,8 @@ describe('StoreStressConcurrent', () => {
<X>
<Suspense>
<MaybeSuspend>
<C key=\\"c\\">
<A key=\\"a\\">
<C key="c">
<A key="a">
<Z>
<Y>",
"[root]
@ -1019,8 +1019,8 @@ describe('StoreStressConcurrent', () => {
<X>
<Suspense>
<MaybeSuspend>
<A key=\\"a\\">
<B key=\\"b\\">
<A key="a">
<B key="b">
<Z>
<Y>",
"[root]
@ -1028,7 +1028,7 @@ describe('StoreStressConcurrent', () => {
<X>
<Suspense>
<MaybeSuspend>
<A key=\\"a\\">
<A key="a">
<Z>
<Y>",
"[root]
@ -1043,7 +1043,7 @@ describe('StoreStressConcurrent', () => {
<X>
<Suspense>
<MaybeSuspend>
<B key=\\"b\\">
<B key="b">
<Z>
<Y>",
"[root]
@ -1051,7 +1051,7 @@ describe('StoreStressConcurrent', () => {
<X>
<Suspense>
<MaybeSuspend>
<A key=\\"a\\">
<A key="a">
<Z>
<Y>",
]

View File

@ -78,7 +78,7 @@ describe('ReactDOMFizzServerBrowser', () => {
);
const result = await readResult(stream);
expect(result).toMatchInlineSnapshot(
`"<div>hello world</div><script>INIT();</script><script src=\\"init.js\\" async=\\"\\"></script><script type=\\"module\\" src=\\"init.mjs\\" async=\\"\\"></script>"`,
`"<div>hello world</div><script>INIT();</script><script src="init.js" async=""></script><script type="module" src="init.mjs" async=""></script>"`,
);
});

View File

@ -91,7 +91,7 @@ describe('ReactDOMFizzServerNode', () => {
pipe(writable);
jest.runAllTimers();
expect(output.result).toMatchInlineSnapshot(
`"<div>hello world</div><script>INIT();</script><script src=\\"init.js\\" async=\\"\\"></script><script type=\\"module\\" src=\\"init.mjs\\" async=\\"\\"></script>"`,
`"<div>hello world</div><script>INIT();</script><script src="init.js" async=""></script><script type="module" src="init.mjs" async=""></script>"`,
);
});

View File

@ -78,7 +78,7 @@ describe('ReactDOMFizzStaticBrowser', () => {
});
const prelude = await readContent(result.prelude);
expect(prelude).toMatchInlineSnapshot(
`"<div>hello world</div><script>INIT();</script><script src=\\"init.js\\" async=\\"\\"></script><script type=\\"module\\" src=\\"init.mjs\\" async=\\"\\"></script>"`,
`"<div>hello world</div><script>INIT();</script><script src="init.js" async=""></script><script type="module" src="init.mjs" async=""></script>"`,
);
});

View File

@ -80,7 +80,7 @@ describe('ReactDOMFizzStaticNode', () => {
);
const prelude = await readContent(result.prelude);
expect(prelude).toMatchInlineSnapshot(
`"<div>hello world</div><script>INIT();</script><script src=\\"init.js\\" async=\\"\\"></script><script type=\\"module\\" src=\\"init.mjs\\" async=\\"\\"></script>"`,
`"<div>hello world</div><script>INIT();</script><script src="init.js" async=""></script><script type="module" src="init.mjs" async=""></script>"`,
);
});

View File

@ -92,7 +92,7 @@ describe('ReactDOMServerHydration', () => {
if (gate(flags => flags.enableClientRenderFallbackOnTextMismatch)) {
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
"Warning: Text content did not match. Server: \\"server\\" Client: \\"client\\"
"Warning: Text content did not match. Server: "server" Client: "client"
in main (at **)
in div (at **)
in Mismatch (at **)",
@ -104,7 +104,7 @@ describe('ReactDOMServerHydration', () => {
} else {
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
"Warning: Text content did not match. Server: \\"server\\" Client: \\"client\\"
"Warning: Text content did not match. Server: "server" Client: "client"
in main (at **)
in div (at **)
in Mismatch (at **)",
@ -131,7 +131,7 @@ describe('ReactDOMServerHydration', () => {
}
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
"Warning: Prop \`dangerouslySetInnerHTML\` did not match. Server: \\"<span>server</span>\\" Client: \\"<span>client</span>\\"
"Warning: Prop \`dangerouslySetInnerHTML\` did not match. Server: "<span>server</span>" Client: "<span>client</span>"
in main (at **)
in div (at **)
in Mismatch (at **)",
@ -155,7 +155,7 @@ describe('ReactDOMServerHydration', () => {
}
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
"Warning: Prop \`className\` did not match. Server: \\"child server\\" Client: \\"child client\\"
"Warning: Prop \`className\` did not match. Server: "child server" Client: "child client"
in main (at **)
in div (at **)
in Mismatch (at **)",
@ -178,7 +178,7 @@ describe('ReactDOMServerHydration', () => {
}
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
"Warning: Prop \`tabIndex\` did not match. Server: \\"null\\" Client: \\"1\\"
"Warning: Prop \`tabIndex\` did not match. Server: "null" Client: "1"
in main (at **)
in div (at **)
in Mismatch (at **)",
@ -224,7 +224,7 @@ describe('ReactDOMServerHydration', () => {
}
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
"Warning: Prop \`tabIndex\` did not match. Server: \\"null\\" Client: \\"1\\"
"Warning: Prop \`tabIndex\` did not match. Server: "null" Client: "1"
in main (at **)
in div (at **)
in Mismatch (at **)",
@ -248,7 +248,7 @@ describe('ReactDOMServerHydration', () => {
}
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
"Warning: Prop \`style\` did not match. Server: \\"opacity:0\\" Client: \\"opacity:1\\"
"Warning: Prop \`style\` did not match. Server: "opacity:0" Client: "opacity:1"
in main (at **)
in div (at **)
in Mismatch (at **)",
@ -363,7 +363,7 @@ describe('ReactDOMServerHydration', () => {
if (gate(flags => flags.enableClientRenderFallbackOnTextMismatch)) {
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
"Warning: Text content did not match. Server: \\"\\" Client: \\"only\\"
"Warning: Text content did not match. Server: "" Client: "only"
in div (at **)
in Mismatch (at **)",
"Warning: An error occurred during hydration. The server HTML was replaced with client content in <div>.",
@ -374,7 +374,7 @@ describe('ReactDOMServerHydration', () => {
} else {
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
"Warning: Text content did not match. Server: \\"\\" Client: \\"only\\"
"Warning: Text content did not match. Server: "" Client: "only"
in div (at **)
in Mismatch (at **)",
]
@ -395,7 +395,7 @@ describe('ReactDOMServerHydration', () => {
}
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
"Warning: Expected server HTML to contain a matching text node for \\"second\\" in <div>.
"Warning: Expected server HTML to contain a matching text node for "second" in <div>.
in div (at **)
in Mismatch (at **)",
"Warning: An error occurred during hydration. The server HTML was replaced with client content in <div>.",
@ -418,7 +418,7 @@ describe('ReactDOMServerHydration', () => {
}
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
"Warning: Expected server HTML to contain a matching text node for \\"first\\" in <div>.
"Warning: Expected server HTML to contain a matching text node for "first" in <div>.
in div (at **)
in Mismatch (at **)",
"Warning: An error occurred during hydration. The server HTML was replaced with client content in <div>.",
@ -441,7 +441,7 @@ describe('ReactDOMServerHydration', () => {
}
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
"Warning: Expected server HTML to contain a matching text node for \\"third\\" in <div>.
"Warning: Expected server HTML to contain a matching text node for "third" in <div>.
in div (at **)
in Mismatch (at **)",
"Warning: An error occurred during hydration. The server HTML was replaced with client content in <div>.",
@ -557,7 +557,7 @@ describe('ReactDOMServerHydration', () => {
}
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
"Warning: Did not expect server HTML to contain the text node \\"only\\" in <div>.
"Warning: Did not expect server HTML to contain the text node "only" in <div>.
in div (at **)
in Mismatch (at **)",
"Warning: An error occurred during hydration. The server HTML was replaced with client content in <div>.",
@ -629,7 +629,7 @@ describe('ReactDOMServerHydration', () => {
}
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
"Warning: Did not expect server HTML to contain the text node \\"third\\" in <div>.
"Warning: Did not expect server HTML to contain the text node "third" in <div>.
in div (at **)
in Mismatch (at **)",
"Warning: An error occurred during hydration. The server HTML was replaced with client content in <div>.",
@ -823,7 +823,7 @@ describe('ReactDOMServerHydration', () => {
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
"Caught [The server did not finish this Suspense boundary: The server used \\"renderToString\\" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to \\"renderToPipeableStream\\" which supports Suspense on the server]",
"Caught [The server did not finish this Suspense boundary: The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server]",
]
`);
});
@ -849,7 +849,7 @@ describe('ReactDOMServerHydration', () => {
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
"Caught [The server did not finish this Suspense boundary: The server used \\"renderToString\\" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to \\"renderToPipeableStream\\" which supports Suspense on the server]",
"Caught [The server did not finish this Suspense boundary: The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server]",
]
`);
});

View File

@ -4,119 +4,119 @@ exports[`ReactFabric recreates host parents even if only children changed 1`] =
"11
RCTView null
RCTView null
RCTView {\\"title\\":\\"a\\"}
RCTView {\\"title\\":\\"b\\"}
RCTView {\\"title\\":\\"c\\"}
RCTView {\\"title\\":\\"d\\"}
RCTView {\\"title\\":\\"e\\"}
RCTView {\\"title\\":\\"f\\"}
RCTView {\\"title\\":\\"g\\"}
RCTView {\\"title\\":\\"h\\"}
RCTView {\\"title\\":\\"i\\"}
RCTView {\\"title\\":\\"j\\"}
RCTView {\\"title\\":\\"k\\"}
RCTView {\\"title\\":\\"l\\"}
RCTView {\\"title\\":\\"m\\"}
RCTView {\\"title\\":\\"n\\"}
RCTView {\\"title\\":\\"o\\"}
RCTView {\\"title\\":\\"p\\"}
RCTView {\\"title\\":\\"q\\"}
RCTView {\\"title\\":\\"r\\"}
RCTView {\\"title\\":\\"s\\"}
RCTView {\\"title\\":\\"t\\"}"
RCTView {"title":"a"}
RCTView {"title":"b"}
RCTView {"title":"c"}
RCTView {"title":"d"}
RCTView {"title":"e"}
RCTView {"title":"f"}
RCTView {"title":"g"}
RCTView {"title":"h"}
RCTView {"title":"i"}
RCTView {"title":"j"}
RCTView {"title":"k"}
RCTView {"title":"l"}
RCTView {"title":"m"}
RCTView {"title":"n"}
RCTView {"title":"o"}
RCTView {"title":"p"}
RCTView {"title":"q"}
RCTView {"title":"r"}
RCTView {"title":"s"}
RCTView {"title":"t"}"
`;
exports[`ReactFabric recreates host parents even if only children changed 2`] = `
"11
RCTView null
RCTView null
RCTView {\\"title\\":\\"m\\"}
RCTView {\\"title\\":\\"x\\"}
RCTView {\\"title\\":\\"h\\"}
RCTView {\\"title\\":\\"p\\"}
RCTView {\\"title\\":\\"g\\"}
RCTView {\\"title\\":\\"w\\"}
RCTView {\\"title\\":\\"f\\"}
RCTView {\\"title\\":\\"r\\"}
RCTView {\\"title\\":\\"a\\"}
RCTView {\\"title\\":\\"l\\"}
RCTView {\\"title\\":\\"k\\"}
RCTView {\\"title\\":\\"e\\"}
RCTView {\\"title\\":\\"o\\"}
RCTView {\\"title\\":\\"i\\"}
RCTView {\\"title\\":\\"v\\"}
RCTView {\\"title\\":\\"c\\"}
RCTView {\\"title\\":\\"s\\"}
RCTView {\\"title\\":\\"t\\"}
RCTView {\\"title\\":\\"z\\"}
RCTView {\\"title\\":\\"y\\"}"
RCTView {"title":"m"}
RCTView {"title":"x"}
RCTView {"title":"h"}
RCTView {"title":"p"}
RCTView {"title":"g"}
RCTView {"title":"w"}
RCTView {"title":"f"}
RCTView {"title":"r"}
RCTView {"title":"a"}
RCTView {"title":"l"}
RCTView {"title":"k"}
RCTView {"title":"e"}
RCTView {"title":"o"}
RCTView {"title":"i"}
RCTView {"title":"v"}
RCTView {"title":"c"}
RCTView {"title":"s"}
RCTView {"title":"t"}
RCTView {"title":"z"}
RCTView {"title":"y"}"
`;
exports[`ReactFabric renders and reorders children 1`] = `
"11
RCTView null
RCTView {\\"title\\":\\"a\\"}
RCTView {\\"title\\":\\"b\\"}
RCTView {\\"title\\":\\"c\\"}
RCTView {\\"title\\":\\"d\\"}
RCTView {\\"title\\":\\"e\\"}
RCTView {\\"title\\":\\"f\\"}
RCTView {\\"title\\":\\"g\\"}
RCTView {\\"title\\":\\"h\\"}
RCTView {\\"title\\":\\"i\\"}
RCTView {\\"title\\":\\"j\\"}
RCTView {\\"title\\":\\"k\\"}
RCTView {\\"title\\":\\"l\\"}
RCTView {\\"title\\":\\"m\\"}
RCTView {\\"title\\":\\"n\\"}
RCTView {\\"title\\":\\"o\\"}
RCTView {\\"title\\":\\"p\\"}
RCTView {\\"title\\":\\"q\\"}
RCTView {\\"title\\":\\"r\\"}
RCTView {\\"title\\":\\"s\\"}
RCTView {\\"title\\":\\"t\\"}"
RCTView {"title":"a"}
RCTView {"title":"b"}
RCTView {"title":"c"}
RCTView {"title":"d"}
RCTView {"title":"e"}
RCTView {"title":"f"}
RCTView {"title":"g"}
RCTView {"title":"h"}
RCTView {"title":"i"}
RCTView {"title":"j"}
RCTView {"title":"k"}
RCTView {"title":"l"}
RCTView {"title":"m"}
RCTView {"title":"n"}
RCTView {"title":"o"}
RCTView {"title":"p"}
RCTView {"title":"q"}
RCTView {"title":"r"}
RCTView {"title":"s"}
RCTView {"title":"t"}"
`;
exports[`ReactFabric renders and reorders children 2`] = `
"11
RCTView null
RCTView {\\"title\\":\\"m\\"}
RCTView {\\"title\\":\\"x\\"}
RCTView {\\"title\\":\\"h\\"}
RCTView {\\"title\\":\\"p\\"}
RCTView {\\"title\\":\\"g\\"}
RCTView {\\"title\\":\\"w\\"}
RCTView {\\"title\\":\\"f\\"}
RCTView {\\"title\\":\\"r\\"}
RCTView {\\"title\\":\\"a\\"}
RCTView {\\"title\\":\\"l\\"}
RCTView {\\"title\\":\\"k\\"}
RCTView {\\"title\\":\\"e\\"}
RCTView {\\"title\\":\\"o\\"}
RCTView {\\"title\\":\\"i\\"}
RCTView {\\"title\\":\\"v\\"}
RCTView {\\"title\\":\\"c\\"}
RCTView {\\"title\\":\\"s\\"}
RCTView {\\"title\\":\\"t\\"}
RCTView {\\"title\\":\\"z\\"}
RCTView {\\"title\\":\\"y\\"}"
RCTView {"title":"m"}
RCTView {"title":"x"}
RCTView {"title":"h"}
RCTView {"title":"p"}
RCTView {"title":"g"}
RCTView {"title":"w"}
RCTView {"title":"f"}
RCTView {"title":"r"}
RCTView {"title":"a"}
RCTView {"title":"l"}
RCTView {"title":"k"}
RCTView {"title":"e"}
RCTView {"title":"o"}
RCTView {"title":"i"}
RCTView {"title":"v"}
RCTView {"title":"c"}
RCTView {"title":"s"}
RCTView {"title":"t"}
RCTView {"title":"z"}
RCTView {"title":"y"}"
`;
exports[`ReactFabric should call complete after inserting children 1`] = `
Array [
"RCTView {\\"foo\\":\\"a\\"}
RCTView {\\"foo\\":\\"b\\"}",
"RCTView {"foo":"a"}
RCTView {"foo":"b"}",
]
`;
exports[`ReactFabric should only pass props diffs to FabricUIManager.cloneNode 1`] = `
"11
RCTText {\\"foo\\":\\"a\\",\\"bar\\":\\"b\\"}
RCTRawText {\\"text\\":\\"1\\"}"
RCTText {"foo":"a","bar":"b"}
RCTRawText {"text":"1"}"
`;
exports[`ReactFabric should only pass props diffs to FabricUIManager.cloneNode 2`] = `
"11
RCTText {\\"foo\\":\\"b\\",\\"bar\\":\\"b\\"}
RCTRawText {\\"text\\":\\"2\\"}"
RCTText {"foo":"b","bar":"b"}
RCTRawText {"text":"2"}"
`;

View File

@ -7,6 +7,6 @@ exports[`fails if unknown/unsupported event types are dispatched 1`] = `
exports[`handles events 1`] = `
"<native root> {}
View {\\"foo\\":\\"outer\\"}
View {\\"foo\\":\\"inner\\"}"
View {"foo":"outer"}
View {"foo":"inner"}"
`;

View File

@ -3,49 +3,49 @@
exports[`ReactNative renders and reorders children 1`] = `
"<native root> {}
RCTView null
RCTView {\\"title\\":\\"a\\"}
RCTView {\\"title\\":\\"b\\"}
RCTView {\\"title\\":\\"c\\"}
RCTView {\\"title\\":\\"d\\"}
RCTView {\\"title\\":\\"e\\"}
RCTView {\\"title\\":\\"f\\"}
RCTView {\\"title\\":\\"g\\"}
RCTView {\\"title\\":\\"h\\"}
RCTView {\\"title\\":\\"i\\"}
RCTView {\\"title\\":\\"j\\"}
RCTView {\\"title\\":\\"k\\"}
RCTView {\\"title\\":\\"l\\"}
RCTView {\\"title\\":\\"m\\"}
RCTView {\\"title\\":\\"n\\"}
RCTView {\\"title\\":\\"o\\"}
RCTView {\\"title\\":\\"p\\"}
RCTView {\\"title\\":\\"q\\"}
RCTView {\\"title\\":\\"r\\"}
RCTView {\\"title\\":\\"s\\"}
RCTView {\\"title\\":\\"t\\"}"
RCTView {"title":"a"}
RCTView {"title":"b"}
RCTView {"title":"c"}
RCTView {"title":"d"}
RCTView {"title":"e"}
RCTView {"title":"f"}
RCTView {"title":"g"}
RCTView {"title":"h"}
RCTView {"title":"i"}
RCTView {"title":"j"}
RCTView {"title":"k"}
RCTView {"title":"l"}
RCTView {"title":"m"}
RCTView {"title":"n"}
RCTView {"title":"o"}
RCTView {"title":"p"}
RCTView {"title":"q"}
RCTView {"title":"r"}
RCTView {"title":"s"}
RCTView {"title":"t"}"
`;
exports[`ReactNative renders and reorders children 2`] = `
"<native root> {}
RCTView null
RCTView {\\"title\\":\\"m\\"}
RCTView {\\"title\\":\\"x\\"}
RCTView {\\"title\\":\\"h\\"}
RCTView {\\"title\\":\\"p\\"}
RCTView {\\"title\\":\\"g\\"}
RCTView {\\"title\\":\\"w\\"}
RCTView {\\"title\\":\\"f\\"}
RCTView {\\"title\\":\\"r\\"}
RCTView {\\"title\\":\\"a\\"}
RCTView {\\"title\\":\\"l\\"}
RCTView {\\"title\\":\\"k\\"}
RCTView {\\"title\\":\\"e\\"}
RCTView {\\"title\\":\\"o\\"}
RCTView {\\"title\\":\\"i\\"}
RCTView {\\"title\\":\\"v\\"}
RCTView {\\"title\\":\\"c\\"}
RCTView {\\"title\\":\\"s\\"}
RCTView {\\"title\\":\\"t\\"}
RCTView {\\"title\\":\\"z\\"}
RCTView {\\"title\\":\\"y\\"}"
RCTView {"title":"m"}
RCTView {"title":"x"}
RCTView {"title":"h"}
RCTView {"title":"p"}
RCTView {"title":"g"}
RCTView {"title":"w"}
RCTView {"title":"f"}
RCTView {"title":"r"}
RCTView {"title":"a"}
RCTView {"title":"l"}
RCTView {"title":"k"}
RCTView {"title":"e"}
RCTView {"title":"o"}
RCTView {"title":"i"}
RCTView {"title":"v"}
RCTView {"title":"c"}
RCTView {"title":"s"}
RCTView {"title":"t"}
RCTView {"title":"z"}
RCTView {"title":"y"}"
`;

View File

@ -59,7 +59,7 @@ describe('ReactDOMServerFB', () => {
});
const result = readResult(stream);
expect(result).toMatchInlineSnapshot(
`"<div>hello world</div><script>INIT();</script><script src=\\"init.js\\" async=\\"\\"></script><script type=\\"module\\" src=\\"init.mjs\\" async=\\"\\"></script>"`,
`"<div>hello world</div><script>INIT();</script><script src="init.js" async=""></script><script type="module" src="init.mjs" async=""></script>"`,
);
});

View File

@ -3,9 +3,9 @@
exports[`ReactFlightNativeRelay can render a Client Component using a module reference and render there 1`] = `
"1
RCTText null
RCTRawText {\\"text\\":\\"Hello\\"}
RCTRawText {\\"text\\":\\", \\"}
RCTRawText {\\"text\\":\\"Seb Smith\\"}"
RCTRawText {"text":"Hello"}
RCTRawText {"text":", "}
RCTRawText {"text":"Seb Smith"}"
`;
exports[`ReactFlightNativeRelay can render a Server Component 1`] = `

View File

@ -183,7 +183,7 @@ describe('ReactFetch', () => {
return text + ' ' + text2;
}
expect(await render(Component)).toMatchInlineSnapshot(
`"GET world [[\\"a\\",\\"A\\"]] GET world [[\\"b\\",\\"B\\"]]"`,
`"GET world [["a","A"]] GET world [["b","B"]]"`,
);
expect(fetchCount).toBe(2);
});

View File

@ -11,14 +11,14 @@ b, new Error('foo')));"
`;
exports[`error transform handles escaped backticks in template string 1`] = `
"import _formatProdErrorMessage from \\"shared/formatProdErrorMessage\\";
"import _formatProdErrorMessage from "shared/formatProdErrorMessage";
Error(_formatProdErrorMessage(231, listener, type));"
`;
exports[`error transform handles ignoring errors that are comment-excluded inside ternary expressions 1`] = `
"/*! FIXME (minify-errors-in-prod): Unminified error message in production build!*/
/*! <expected-error-format>\\"bar\\"</expected-error-format>*/
/*! <expected-error-format>"bar"</expected-error-format>*/
var val = someBool ? //eslint-disable-next-line react-internal/prod-error-codes
new Error('foo') : someOtherBool ? new Error('bar') : //eslint-disable-next-line react-internal/prod-error-codes
new Error('baz');"
@ -37,7 +37,7 @@ NotAnError();"
exports[`error transform should output FIXME for errors that don't have a matching error code 1`] = `
"/*! FIXME (minify-errors-in-prod): Unminified error message in production build!*/
/*! <expected-error-format>\\"This is not a real error message.\\"</expected-error-format>*/
/*! <expected-error-format>"This is not a real error message."</expected-error-format>*/
Error('This is not a real error message.');"
`;
@ -47,26 +47,26 @@ Error('This is not a real error message.');"
`;
exports[`error transform should replace error constructors (no new) 1`] = `
"import _formatProdErrorMessage from \\"shared/formatProdErrorMessage\\";
"import _formatProdErrorMessage from "shared/formatProdErrorMessage";
Error(_formatProdErrorMessage(16));"
`;
exports[`error transform should replace error constructors 1`] = `
"import _formatProdErrorMessage from \\"shared/formatProdErrorMessage\\";
"import _formatProdErrorMessage from "shared/formatProdErrorMessage";
Error(_formatProdErrorMessage(16));"
`;
exports[`error transform should support error constructors with concatenated messages 1`] = `
"import _formatProdErrorMessage from \\"shared/formatProdErrorMessage\\";
"import _formatProdErrorMessage from "shared/formatProdErrorMessage";
Error(_formatProdErrorMessage(7, foo, bar));"
`;
exports[`error transform should support interpolating arguments with concatenation 1`] = `
"import _formatProdErrorMessage from \\"shared/formatProdErrorMessage\\";
"import _formatProdErrorMessage from "shared/formatProdErrorMessage";
Error(_formatProdErrorMessage(7, foo, bar));"
`;
exports[`error transform should support interpolating arguments with template strings 1`] = `
"import _formatProdErrorMessage from \\"shared/formatProdErrorMessage\\";
"import _formatProdErrorMessage from "shared/formatProdErrorMessage";
Error(_formatProdErrorMessage(7, foo, bar));"
`;

View File

@ -25,7 +25,6 @@ module.exports = {
legacyFakeTimers: true,
},
snapshotFormat: {
escapeString: true,
printBasicPrototype: true,
},
snapshotSerializers: [require.resolve('jest-snapshot-serializer-raw')],