@@ -176,11 +176,13 @@ describe('DDWAF', () => {
176176 ( ) => waf . createOrUpdateConfig ( 'string' , 'config/update' ) ,
177177 new TypeError ( 'First argument must be an object' )
178178 )
179+ assert . strictEqual ( waf . disposed , false )
179180 } )
180181
181182 it ( 'should return false when updating configuration with invalid configuration' , ( ) => {
182183 const waf = new DDWAF ( rules , 'recommended' )
183184 assert . strictEqual ( waf . createOrUpdateConfig ( { } , 'config/update' ) , false )
185+ assert . strictEqual ( waf . disposed , false )
184186 } )
185187
186188 it ( 'should return true when updating configuration' , ( ) => {
@@ -251,11 +253,16 @@ describe('DDWAF', () => {
251253 it ( 'should return true when removing an existing configuration' , ( ) => {
252254 const waf = new DDWAF ( rules , 'recommended' )
253255 assert . strictEqual ( waf . removeConfig ( 'recommended' ) , true )
256+ assert . strictEqual ( waf . configPaths . length , 0 )
254257 } )
255258
256259 it ( 'should return false when removing a non-existing configuration' , ( ) => {
257260 const waf = new DDWAF ( rules , 'recommended' )
258261 assert . strictEqual ( waf . removeConfig ( 'config/update' ) , false )
262+ assert . ok (
263+ waf . configPaths . includes ( 'recommended' ) &&
264+ waf . configPaths . length === 1
265+ )
259266 } )
260267 } )
261268
0 commit comments