@@ -598,64 +598,6 @@ describe('ReactHooksInspectionIntegration', () => {
598598 ] ) ;
599599 } ) ;
600600
601- it ( 'should support composite useOpaqueIdentifier hook' , ( ) => {
602- function Foo ( props ) {
603- const id = React . unstable_useOpaqueIdentifier ( ) ;
604- const [ state ] = React . useState ( ( ) => 'hello' , [ ] ) ;
605- return < div id = { id } > { state } </ div > ;
606- }
607-
608- const renderer = ReactTestRenderer . create ( < Foo /> ) ;
609- const childFiber = renderer . root . findByType ( Foo ) . _currentFiber ( ) ;
610- const tree = ReactDebugTools . inspectHooksOfFiber ( childFiber ) ;
611-
612- expect ( tree . length ) . toEqual ( 2 ) ;
613-
614- expect ( tree [ 0 ] . id ) . toEqual ( 0 ) ;
615- expect ( tree [ 0 ] . isStateEditable ) . toEqual ( false ) ;
616- expect ( tree [ 0 ] . name ) . toEqual ( 'OpaqueIdentifier' ) ;
617- expect ( String ( tree [ 0 ] . value ) . startsWith ( 'c_' ) ) . toBe ( true ) ;
618-
619- expect ( tree [ 1 ] ) . toEqual ( {
620- id : 1 ,
621- isStateEditable : true ,
622- name : 'State' ,
623- value : 'hello' ,
624- subHooks : [ ] ,
625- } ) ;
626- } ) ;
627-
628- it ( 'should support composite useOpaqueIdentifier hook in concurrent mode' , ( ) => {
629- function Foo ( props ) {
630- const id = React . unstable_useOpaqueIdentifier ( ) ;
631- const [ state ] = React . useState ( 'hello' ) ;
632- return < div id = { id } > { state } </ div > ;
633- }
634-
635- const renderer = ReactTestRenderer . create ( < Foo /> , {
636- unstable_isConcurrent : true ,
637- } ) ;
638- expect ( Scheduler ) . toFlushWithoutYielding ( ) ;
639-
640- const childFiber = renderer . root . findByType ( Foo ) . _currentFiber ( ) ;
641- const tree = ReactDebugTools . inspectHooksOfFiber ( childFiber ) ;
642-
643- expect ( tree . length ) . toEqual ( 2 ) ;
644-
645- expect ( tree [ 0 ] . id ) . toEqual ( 0 ) ;
646- expect ( tree [ 0 ] . isStateEditable ) . toEqual ( false ) ;
647- expect ( tree [ 0 ] . name ) . toEqual ( 'OpaqueIdentifier' ) ;
648- expect ( String ( tree [ 0 ] . value ) . startsWith ( 'c_' ) ) . toBe ( true ) ;
649-
650- expect ( tree [ 1 ] ) . toEqual ( {
651- id : 1 ,
652- isStateEditable : true ,
653- name : 'State' ,
654- value : 'hello' ,
655- subHooks : [ ] ,
656- } ) ;
657- } ) ;
658-
659601 it ( 'should support useId hook' , ( ) => {
660602 function Foo ( props ) {
661603 const id = React . unstable_useId ( ) ;
0 commit comments