We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 20e6244 commit 90393f9Copy full SHA for 90393f9
test/issues.ts
@@ -238,6 +238,15 @@ test('issues/44', t => {
238
t.deepEqual(author, {firstName: 'Chris'}, 'patch reference should not be changed')
239
})
240
241
+test('issues/76', t => {
242
+ t.true(({} as any).polluted === undefined, 'Object prototype should not be polluted')
243
+ const value = {}
244
+ applyPatch(value, [
245
+ {op: 'add', path: '/__proto__/polluted', value: 'Hello!'}
246
+ ])
247
+ t.true(({} as any).polluted === undefined, 'Object prototype should still not be polluted')
248
+})
249
+
250
test('issues/78', t => {
251
const user = {firstName: 'Chris'}
252
const patch_results = applyPatch(user, [
0 commit comments