File tree Expand file tree Collapse file tree
packages/react/src/stores/__tests__ Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ afterAll(() => {
2323} )
2424
2525describe . each ( [
26- [ true , 'browser' ] ,
26+ [ false , 'browser' ] ,
2727 [ false , 'server' ] ,
2828] ) ( 'themeStore %s' , ( _isBrowser , _title ) => {
2929 const originalWindow = globalThis . window
@@ -32,12 +32,15 @@ describe.each([
3232 if ( ! _isBrowser ) {
3333 // @ts -expect-error - Temporarily remove window for SSR test
3434 delete globalThis . window
35+ } else {
36+ document . documentElement . removeAttribute ( 'data-theme' )
3537 }
36- document . documentElement . removeAttribute ( 'data-theme' )
3738 } )
3839
3940 afterEach ( ( ) => {
40- document . documentElement . removeAttribute ( 'data-theme' )
41+ if ( _isBrowser ) {
42+ document . documentElement . removeAttribute ( 'data-theme' )
43+ }
4144 globalThis . window = originalWindow
4245 } )
4346 if ( _isBrowser ) {
You can’t perform that action at this time.
0 commit comments