@@ -1731,61 +1731,6 @@ describe('InspectedElement', () => {
1731
1731
` ) ;
1732
1732
} ) ;
1733
1733
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
-
1789
1734
it ( 'should enable inspected values to be stored as global variables' , async ( ) => {
1790
1735
const Example = ( ) => null ;
1791
1736
0 commit comments