it('should return a copy of the data', () => { const item = new ObservableJSON(); item.set('foo', { bar: 1 }); const value = item.toJSON(); value['bar'] = 2; expect((item.get('foo') as any)['bar']).to.equal(1); });
it('should serialize the model to JSON', () => { const item = new ObservableJSON(); item.set('foo', 1); expect(item.toJSON()['foo']).to.equal(1); });