Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Sep 25, 2024
1 parent e3ab1dd commit 77fa57b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ const fixtures = {
json: '[["Uint8Array","AQID"]]'
},
{
name: "ArrayBuffer",
name: 'ArrayBuffer',
value: new Uint8Array([1, 2, 3]).buffer,
js: 'new Uint8Array([1,2,3]).buffer',
json: '[["ArrayBuffer","AQID"]]'
Expand Down Expand Up @@ -429,9 +429,10 @@ const fixtures = {
return `new Custom(${uneval(value.value)})`;
}
},
reducers: {
// test for https://github.com/Rich-Harris/devalue/pull/80
reducers: Object.assign(Object.create({ polluted: true }), {
Custom: (x) => x instanceof Custom && x.value
},
}),
revivers: {
Custom: (x) => new Custom(x)
},
Expand Down

0 comments on commit 77fa57b

Please sign in to comment.