diff --git a/packages/react-debug-tools/src/__tests__/ReactHooksInspectionIntegration-test.js b/packages/react-debug-tools/src/__tests__/ReactHooksInspectionIntegration-test.js index a74bbe9ca2817..2a512cc495cf1 100644 --- a/packages/react-debug-tools/src/__tests__/ReactHooksInspectionIntegration-test.js +++ b/packages/react-debug-tools/src/__tests__/ReactHooksInspectionIntegration-test.js @@ -772,8 +772,11 @@ describe('ReactHooksInspectionIntegration', () => { it('should inspect the value of the current provider in useContext', () => { const MyContext = React.createContext('default'); + const ThemeContext = React.createContext('default'); + ThemeContext.displayName = 'Theme'; function Foo(props) { const value = React.useContext(MyContext); + React.useContext(ThemeContext); return
{value}
; } const renderer = ReactTestRenderer.create( @@ -799,6 +802,20 @@ describe('ReactHooksInspectionIntegration', () => { "subHooks": [], "value": "contextual", }, + { + "debugInfo": null, + "hookSource": { + "columnNumber": 0, + "fileName": "**", + "functionName": "Foo", + "lineNumber": 0, + }, + "id": null, + "isStateEditable": false, + "name": "Theme", + "subHooks": [], + "value": "default", + }, ] `); });