mirror of
https://github.com/hanzoai/jest.git
synced 2026-09-24 16:59:57 +00:00
chore: use Object.fromEntries over reduce (#14822)
This commit is contained in:
@@ -79,10 +79,11 @@ function getPackages() {
|
||||
},
|
||||
/* eslint-enable */
|
||||
'./package.json': './package.json',
|
||||
...Object.values(pkg.bin || {}).reduce(
|
||||
(mem, curr) =>
|
||||
Object.assign(mem, {[curr.replace(/\.js$/, '')]: curr}),
|
||||
{},
|
||||
...Object.fromEntries(
|
||||
Object.values(pkg.bin || {}).map(curr => [
|
||||
curr.replace(/\.js$/, ''),
|
||||
curr,
|
||||
]),
|
||||
),
|
||||
...(pkg.name === 'jest-circus'
|
||||
? {'./runner': './build/runner.js'}
|
||||
|
||||
Reference in New Issue
Block a user