File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -99,4 +99,25 @@ describe('VuidManager', () => {
99
99
verify ( mockCache . set ( anyString ( ) , anything ( ) ) ) . once ( ) ;
100
100
expect ( VuidManager . isVuid ( manager . vuid ) ) . toBe ( true ) ;
101
101
} ) ;
102
+
103
+ it ( 'should call remove when enableVuid is not specified' , async ( ) => {
104
+ const manager = await VuidManager . instance ( instance ( mockCache ) ) ;
105
+
106
+ verify ( mockCache . remove ( anyString ( ) ) ) . once ( ) ;
107
+ expect ( manager . vuid ) . toBe ( '' ) ;
108
+ } ) ;
109
+
110
+ it ( 'should call remove when enableVuid is false' , async ( ) => {
111
+ const manager = await VuidManager . instance ( instance ( mockCache ) , { enableVuid : false } ) ;
112
+
113
+ verify ( mockCache . remove ( anyString ( ) ) ) . once ( ) ;
114
+ expect ( manager . vuid ) . toBe ( '' ) ;
115
+ } ) ;
116
+
117
+ it ( 'should never call remove when enableVuid is true' , async ( ) => {
118
+ const manager = await VuidManager . instance ( instance ( mockCache ) , { enableVuid : true } ) ;
119
+
120
+ verify ( mockCache . remove ( anyString ( ) ) ) . never ( ) ;
121
+ expect ( VuidManager . isVuid ( manager . vuid ) ) . toBe ( true ) ;
122
+ } ) ;
102
123
} ) ;
You can’t perform that action at this time.
0 commit comments