File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
packages/signals/signals/src/lib/storage/__tests__ Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -34,14 +34,15 @@ describe('WebStorage', () => {
3434
3535 webStorage . setItem (
3636 key ,
37- // @ts -ignore
38- undefined
37+ // @ts -ignore - intentational non-serializable value
38+ BigInt ( 1 )
3939 )
4040
41- const result = webStorage . getItem ( key )
42-
43- expect ( result ) . toBeUndefined ( )
44- expect ( consoleWarnSpy ) . toHaveBeenCalledTimes ( 1 )
41+ expect ( consoleWarnSpy ) . toHaveBeenCalledWith (
42+ 'Storage set error' ,
43+ expect . any ( Object ) ,
44+ expect . any ( Error )
45+ )
4546 } )
4647
4748 it ( 'should handle JSON parsing errors gracefully when retrieving' , ( ) => {
@@ -54,7 +55,11 @@ describe('WebStorage', () => {
5455 const result = webStorage . getItem ( key )
5556
5657 expect ( result ) . toBeUndefined ( )
57- expect ( consoleWarnSpy ) . toHaveBeenCalledTimes ( 1 )
58+ expect ( consoleWarnSpy ) . toHaveBeenCalledWith (
59+ 'Storage retrieval error' ,
60+ expect . any ( Object ) ,
61+ expect . any ( Error )
62+ )
5863 } )
5964 } )
6065} )
You can’t perform that action at this time.
0 commit comments