We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f3733fe commit 47e718dCopy full SHA for 47e718d
test/issues.ts
@@ -237,3 +237,12 @@ test('issues/44', t => {
237
t.true(patch_results.every(result => result == null), 'should apply patch successfully')
238
t.deepEqual(author, {firstName: 'Chris'}, 'patch reference should not be changed')
239
})
240
+
241
+test('issues/78', t => {
242
+ const user = {firstName: 'Chris'}
243
+ const patch_results = applyPatch(user, [
244
+ {op: 'add', path: '/createdAt', value: new Date('2010-08-10T22:10:48Z')},
245
+ ])
246
+ t.true(patch_results.every(result => result == null), 'should apply patch successfully')
247
+ t.deepEqual(user['createdAt'].getTime(), 1281478248000, 'should add Date recoverably')
248
+})
0 commit comments