Skip to content

Commit 9c3420f

Browse files
committed
failing test
1 parent 162c668 commit 9c3420f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

test/test.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ const fixtures = {
386386
{
387387
name: 'Custom type',
388388
value: [instance, instance],
389-
js: null,
389+
js: '(function(a){return [a,a]}(new Custom({answer:42})))',
390390
json: '[[1,1],["Custom",2],{"answer":3},42]',
391391
reducers: {
392392
Custom: (x) => x instanceof Custom && x.value
@@ -406,7 +406,6 @@ const fixtures = {
406406
for (const [name, tests] of Object.entries(fixtures)) {
407407
const test = uvu.suite(`uneval: ${name}`);
408408
for (const t of tests) {
409-
if (t.reducers) continue;
410409
test(t.name, () => {
411410
const actual = uneval(t.value);
412411
const expected = t.js;
@@ -448,9 +447,8 @@ for (const [name, tests] of Object.entries(fixtures)) {
448447
for (const [name, tests] of Object.entries(fixtures)) {
449448
const test = uvu.suite(`unflatten: ${name}`);
450449
for (const t of tests) {
451-
if (t.reducers) continue;
452450
test(t.name, () => {
453-
const actual = unflatten(JSON.parse(t.json));
451+
const actual = unflatten(JSON.parse(t.json), t.revivers);
454452
const expected = t.value;
455453

456454
if (t.validate) {

0 commit comments

Comments
 (0)