@@ -205,6 +205,7 @@ describe('ContentFeature class', () => {
205205 expect ( this . getFeatureSetting ( 'otherTest4' ) ) . toBe ( 'expected' ) ;
206206 expect ( this . getFeatureSetting ( 'test5' ) ) . toBe ( 'yep' ) ;
207207 expect ( this . getFeatureSetting ( 'otherTest5' ) ) . toBe ( 'expected' ) ;
208+ expect ( this . getFeatureSetting ( 'notPresent' ) ) . toBeUndefined ( ) ;
208209 didRun = true ;
209210 }
210211 }
@@ -227,8 +228,8 @@ describe('ContentFeature class', () => {
227228 domain : [ 'example.com' ] ,
228229 } ,
229230 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' } ,
232233 ] ,
233234 } ,
234235 {
@@ -241,8 +242,8 @@ describe('ContentFeature class', () => {
241242 } ,
242243 ] ,
243244 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' } ,
246247 ] ,
247248 } ,
248249 {
@@ -255,8 +256,8 @@ describe('ContentFeature class', () => {
255256 } ,
256257 ] ,
257258 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' } ,
260261 ] ,
261262 } ,
262263 {
@@ -270,8 +271,8 @@ describe('ContentFeature class', () => {
270271 } ,
271272 ] ,
272273 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' } ,
275276 ] ,
276277 } ,
277278 {
@@ -283,8 +284,10 @@ describe('ContentFeature class', () => {
283284 } ,
284285 ] ,
285286 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' } ,
288291 ] ,
289292 } ,
290293 ] ,
0 commit comments