Skip to content

Commit b173f2e

Browse files
author
Sebastian Silbermann
committed
Remove duplicate test
1 parent d0a4b61 commit b173f2e

File tree

1 file changed

+0
-55
lines changed

1 file changed

+0
-55
lines changed

packages/react-devtools-shared/src/__tests__/inspectedElement-test.js

-55
Original file line numberDiff line numberDiff line change
@@ -1731,61 +1731,6 @@ describe('InspectedElement', () => {
17311731
`);
17321732
});
17331733

1734-
it('should use the displayName of the Context when naming the useContext hook', async () => {
1735-
const NamedContext = React.createContext(0);
1736-
NamedContext.displayName = 'NamedContext';
1737-
const AnonymousContext = React.createContext(1);
1738-
const Example = () => {
1739-
React.useContext(NamedContext);
1740-
React.useContext(AnonymousContext);
1741-
return null;
1742-
};
1743-
1744-
const container = document.createElement('div');
1745-
await utils.actAsync(() => legacyRender(<Example />, container));
1746-
1747-
const inspectedElement = await inspectElementAtIndex(0);
1748-
expect(inspectedElement).toMatchInlineSnapshot(`
1749-
Object {
1750-
"context": null,
1751-
"events": undefined,
1752-
"hooks": Array [
1753-
Object {
1754-
"hookSource": Object {
1755-
"columnNumber": "removed by Jest serializer",
1756-
"fileName": "react-devtools-shared/src/__tests__/inspectedElement-test.js",
1757-
"functionName": "Example",
1758-
"lineNumber": "removed by Jest serializer",
1759-
},
1760-
"id": null,
1761-
"isStateEditable": false,
1762-
"name": "NamedContext",
1763-
"subHooks": Array [],
1764-
"value": 0,
1765-
},
1766-
Object {
1767-
"hookSource": Object {
1768-
"columnNumber": "removed by Jest serializer",
1769-
"fileName": "react-devtools-shared/src/__tests__/inspectedElement-test.js",
1770-
"functionName": "Example",
1771-
"lineNumber": "removed by Jest serializer",
1772-
},
1773-
"id": null,
1774-
"isStateEditable": false,
1775-
"name": "Context",
1776-
"subHooks": Array [],
1777-
"value": 1,
1778-
},
1779-
],
1780-
"id": 2,
1781-
"owners": null,
1782-
"props": Object {},
1783-
"rootType": "render()",
1784-
"state": null,
1785-
}
1786-
`);
1787-
});
1788-
17891734
it('should enable inspected values to be stored as global variables', async () => {
17901735
const Example = () => null;
17911736

0 commit comments

Comments
 (0)