Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update jest escapeString config #26140

Merged
merged 1 commit into from
Feb 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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,
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
},
Expand Down
22 changes: 11 additions & 11 deletions packages/react-devtools-shared/src/__tests__/storeOwners-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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">"
`);
});

Expand Down Expand Up @@ -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));
Expand All @@ -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">"
`);
});
});
Loading