@@ -205,6 +205,7 @@ describe('ContentFeature class', () => {
205
205
expect ( this . getFeatureSetting ( 'otherTest4' ) ) . toBe ( 'expected' ) ;
206
206
expect ( this . getFeatureSetting ( 'test5' ) ) . toBe ( 'yep' ) ;
207
207
expect ( this . getFeatureSetting ( 'otherTest5' ) ) . toBe ( 'expected' ) ;
208
+ expect ( this . getFeatureSetting ( 'notPresent' ) ) . toBeUndefined ( ) ;
208
209
didRun = true ;
209
210
}
210
211
}
@@ -227,8 +228,8 @@ describe('ContentFeature class', () => {
227
228
domain : [ 'example.com' ] ,
228
229
} ,
229
230
patchSettings : [
230
- { op : 'replace ' , path : '/test' , value : 'enabled2' } ,
231
- { op : 'replace ' , path : '/otherTest' , value : 'bloop' } ,
231
+ { op : 'add ' , path : '/test' , value : 'enabled2' } ,
232
+ { op : 'add ' , path : '/otherTest' , value : 'bloop' } ,
232
233
] ,
233
234
} ,
234
235
{
@@ -241,8 +242,8 @@ describe('ContentFeature class', () => {
241
242
} ,
242
243
] ,
243
244
patchSettings : [
244
- { op : 'replace ' , path : '/test2' , value : 'noop' } ,
245
- { op : 'replace ' , path : '/otherTest2' , value : 'me' } ,
245
+ { op : 'add ' , path : '/test2' , value : 'noop' } ,
246
+ { op : 'add ' , path : '/otherTest2' , value : 'me' } ,
246
247
] ,
247
248
} ,
248
249
{
@@ -255,8 +256,8 @@ describe('ContentFeature class', () => {
255
256
} ,
256
257
] ,
257
258
patchSettings : [
258
- { op : 'replace ' , path : '/test3' , value : 'yep' } ,
259
- { op : 'replace ' , path : '/otherTest3' , value : 'expected' } ,
259
+ { op : 'add ' , path : '/test3' , value : 'yep' } ,
260
+ { op : 'add ' , path : '/otherTest3' , value : 'expected' } ,
260
261
] ,
261
262
} ,
262
263
{
@@ -270,8 +271,8 @@ describe('ContentFeature class', () => {
270
271
} ,
271
272
] ,
272
273
patchSettings : [
273
- { op : 'replace ' , path : '/test4' , value : 'nope' } ,
274
- { op : 'replace ' , path : '/otherTest4' , value : 'notexpected' } ,
274
+ { op : 'add ' , path : '/test4' , value : 'nope' } ,
275
+ { op : 'add ' , path : '/otherTest4' , value : 'notexpected' } ,
275
276
] ,
276
277
} ,
277
278
{
@@ -283,8 +284,10 @@ describe('ContentFeature class', () => {
283
284
} ,
284
285
] ,
285
286
patchSettings : [
286
- { op : 'replace' , path : '/test5' , value : 'yep' } ,
287
- { op : 'replace' , path : '/otherTest5' , value : 'expected' } ,
287
+ { op : 'add' , path : '/test5' , value : 'yep' } ,
288
+ { op : 'add' , path : '/otherTest5' , value : 'expected' } ,
289
+ // This should not be added as replace state
290
+ { op : 'replace' , path : '/notPresent' , value : 'notpresent' } ,
288
291
] ,
289
292
} ,
290
293
] ,
0 commit comments