diff --git a/packages/reactive-dict/reactive-dict-tests.js b/packages/reactive-dict/reactive-dict-tests.js index fdf5ad7d9d..8c440b880d 100644 --- a/packages/reactive-dict/reactive-dict-tests.js +++ b/packages/reactive-dict/reactive-dict-tests.js @@ -11,9 +11,25 @@ Tinytest.add('ReactiveDict - initialize with data', function (test) { var dict = new ReactiveDict({ now: now }); - + var nowFromDict = dict.get('now'); test.equal(nowFromDict, now); + + // Test with static value here as a named dict could + // be migrated if code reload happens while testing + dict = new ReactiveDict('foo', { + foo: 'bar' + }); + + nowFromDict = dict.get('foo'); + test.equal(nowFromDict, 'bar'); + + dict = new ReactiveDict(undefined, { + now: now + }); + + nowFromDict = dict.get('now'); + test.equal(nowFromDict, now); }); Tinytest.add('ReactiveDict - setDefault', function (test) {