@@ -28,23 +28,27 @@ describe('constructCoreClass', () => {
2828 vi . clearAllMocks ( )
2929 } )
3030 it ( 'should export DevtoolsCore and NoOpDevtoolsCore classes and make no calls to Solid.js primitives' , ( ) => {
31- const [ DevtoolsCore , NoOpDevtoolsCore ] = constructCoreClass (
32- ( ) => < div > Test Component</ div > ,
33- )
31+ const [ DevtoolsCore , NoOpDevtoolsCore ] = constructCoreClass ( ( ) => (
32+ < div > Test Component</ div >
33+ ) )
3434 expect ( DevtoolsCore ) . toBeDefined ( )
3535 expect ( NoOpDevtoolsCore ) . toBeDefined ( )
3636 expect ( lazyImportMock ) . not . toHaveBeenCalled ( )
3737 } )
3838
3939 it ( 'DevtoolsCore should call solid primitives when mount is called' , async ( ) => {
40- const [ DevtoolsCore , _ ] = constructCoreClass ( ( ) => < div > Test Component</ div > )
40+ const [ DevtoolsCore , _ ] = constructCoreClass ( ( ) => (
41+ < div > Test Component</ div >
42+ ) )
4143 const instance = new DevtoolsCore ( )
4244 await instance . mount ( document . createElement ( 'div' ) , 'dark' )
4345 expect ( renderMock ) . toHaveBeenCalled ( )
4446 } )
4547
4648 it ( 'DevtoolsCore should throw if mount is called twice without unmounting' , async ( ) => {
47- const [ DevtoolsCore , _ ] = constructCoreClass ( ( ) => < div > Test Component</ div > )
49+ const [ DevtoolsCore , _ ] = constructCoreClass ( ( ) => (
50+ < div > Test Component</ div >
51+ ) )
4852 const instance = new DevtoolsCore ( )
4953 await instance . mount ( document . createElement ( 'div' ) , 'dark' )
5054 await expect (
@@ -53,13 +57,17 @@ describe('constructCoreClass', () => {
5357 } )
5458
5559 it ( 'DevtoolsCore should throw if unmount is called before mount' , ( ) => {
56- const [ DevtoolsCore , _ ] = constructCoreClass ( ( ) => < div > Test Component</ div > )
60+ const [ DevtoolsCore , _ ] = constructCoreClass ( ( ) => (
61+ < div > Test Component</ div >
62+ ) )
5763 const instance = new DevtoolsCore ( )
5864 expect ( ( ) => instance . unmount ( ) ) . toThrow ( 'Devtools is not mounted' )
5965 } )
6066
6167 it ( 'DevtoolsCore should allow mount after unmount' , async ( ) => {
62- const [ DevtoolsCore , _ ] = constructCoreClass ( ( ) => < div > Test Component</ div > )
68+ const [ DevtoolsCore , _ ] = constructCoreClass ( ( ) => (
69+ < div > Test Component</ div >
70+ ) )
6371 const instance = new DevtoolsCore ( )
6472 await instance . mount ( document . createElement ( 'div' ) , 'dark' )
6573 instance . unmount ( )
@@ -69,9 +77,9 @@ describe('constructCoreClass', () => {
6977 } )
7078
7179 it ( 'NoOpDevtoolsCore should not call any solid primitives when mount is called' , async ( ) => {
72- const [ _ , NoOpDevtoolsCore ] = constructCoreClass (
73- ( ) => < div > Test Component</ div > ,
74- )
80+ const [ _ , NoOpDevtoolsCore ] = constructCoreClass ( ( ) => (
81+ < div > Test Component</ div >
82+ ) )
7583 const noOpInstance = new NoOpDevtoolsCore ( )
7684 await noOpInstance . mount ( document . createElement ( 'div' ) , 'dark' )
7785
@@ -81,9 +89,9 @@ describe('constructCoreClass', () => {
8189 } )
8290
8391 it ( 'NoOpDevtoolsCore should not throw if mount is called multiple times' , async ( ) => {
84- const [ _ , NoOpDevtoolsCore ] = constructCoreClass (
85- ( ) => < div > Test Component</ div > ,
86- )
92+ const [ _ , NoOpDevtoolsCore ] = constructCoreClass ( ( ) => (
93+ < div > Test Component</ div >
94+ ) )
8795 const noOpInstance = new NoOpDevtoolsCore ( )
8896 await noOpInstance . mount ( document . createElement ( 'div' ) , 'dark' )
8997 await expect (
@@ -92,17 +100,17 @@ describe('constructCoreClass', () => {
92100 } )
93101
94102 it ( 'NoOpDevtoolsCore should not throw if unmount is called before mount' , ( ) => {
95- const [ _ , NoOpDevtoolsCore ] = constructCoreClass (
96- ( ) => < div > Test Component</ div > ,
97- )
103+ const [ _ , NoOpDevtoolsCore ] = constructCoreClass ( ( ) => (
104+ < div > Test Component</ div >
105+ ) )
98106 const noOpInstance = new NoOpDevtoolsCore ( )
99107 expect ( ( ) => noOpInstance . unmount ( ) ) . not . toThrow ( )
100108 } )
101109
102110 it ( 'NoOpDevtoolsCore should not throw if unmount is called after mount' , async ( ) => {
103- const [ _ , NoOpDevtoolsCore ] = constructCoreClass (
104- ( ) => < div > Test Component</ div > ,
105- )
111+ const [ _ , NoOpDevtoolsCore ] = constructCoreClass ( ( ) => (
112+ < div > Test Component</ div >
113+ ) )
106114 const noOpInstance = new NoOpDevtoolsCore ( )
107115 await noOpInstance . mount ( document . createElement ( 'div' ) , 'dark' )
108116 expect ( ( ) => noOpInstance . unmount ( ) ) . not . toThrow ( )
0 commit comments