File tree 2 files changed +19
-0
lines changed 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -71,4 +71,22 @@ describe("Store", () => {
71
71
expect ( store . nodes . value . get ( 2 ) ) . to . equal ( undefined ) ;
72
72
expect ( store . nodes . value . get ( 3 ) ) . to . equal ( undefined ) ;
73
73
} ) ;
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
+ } ) ;
74
92
} ) ;
Original file line number Diff line number Diff line change @@ -136,6 +136,7 @@ export function createStore(): Store {
136
136
selection . selected . value = - 1 ;
137
137
collapser . collapsed . value = new Set ( ) ;
138
138
stats . value = null ;
139
+ inspectData . value = null ;
139
140
} ,
140
141
subscribe ( fn ) {
141
142
const idx = listeners . push ( fn ) ;
You can’t perform that action at this time.
0 commit comments