Skip to content

Commit c520eb8

Browse files
committed
fix(test): replace Object.fromEntries with the godlike reduce()
1 parent 962f8e8 commit c520eb8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const barePrompt = {
1818
}
1919
return [p.name, ret]
2020
}))
21-
return Object.fromEntries(out)
21+
return out.reduce((obj, [key, value]) => ({ ...obj, [key]: value }), {})
2222
}
2323
}
2424

@@ -69,7 +69,7 @@ suite('create-package-json', () => {
6969
}
7070
return [p.name, ret]
7171
}))
72-
return Object.fromEntries(out)
72+
return out.reduce((obj, [key, value]) => ({ ...obj, [key]: value }), {})
7373
}
7474
}
7575
})

0 commit comments

Comments
 (0)