File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -71,4 +71,22 @@ describe("Store", () => {
7171 expect ( store . nodes . value . get ( 2 ) ) . to . equal ( undefined ) ;
7272 expect ( store . nodes . value . get ( 3 ) ) . to . equal ( undefined ) ;
7373 } ) ;
74+
75+ it ( "should reset inspectData on clear()" , ( ) => {
76+ const store = createStore ( ) ;
77+ store . inspectData . value = {
78+ canSuspend : false ,
79+ context : null ,
80+ hooks : null ,
81+ id : 123 ,
82+ key : null ,
83+ name : "Foo" ,
84+ props : null ,
85+ state : null ,
86+ suspended : false ,
87+ type : 1 ,
88+ } ;
89+ store . clear ( ) ;
90+ expect ( store . inspectData . value ) . to . equal ( null ) ;
91+ } ) ;
7492} ) ;
Original file line number Diff line number Diff line change @@ -136,6 +136,7 @@ export function createStore(): Store {
136136 selection . selected . value = - 1 ;
137137 collapser . collapsed . value = new Set ( ) ;
138138 stats . value = null ;
139+ inspectData . value = null ;
139140 } ,
140141 subscribe ( fn ) {
141142 const idx = listeners . push ( fn ) ;
You can’t perform that action at this time.
0 commit comments