mirror of
https://github.com/pnpm/pnpm.git
synced 2026-05-14 03:26:13 -04:00
38 lines
891 B
TypeScript
38 lines
891 B
TypeScript
import { LOCKFILE_VERSION } from '@pnpm/constants'
|
|
import { normalizeLockfile } from '../lib/write'
|
|
|
|
test('empty overrides and neverBuiltDependencies are removed during lockfile normalization', () => {
|
|
expect(normalizeLockfile({
|
|
lockfileVersion: LOCKFILE_VERSION,
|
|
// but this should be preserved.
|
|
onlyBuiltDependencies: [],
|
|
overrides: {},
|
|
neverBuiltDependencies: [],
|
|
patchedDependencies: {},
|
|
packages: {},
|
|
importers: {
|
|
foo: {
|
|
dependencies: {
|
|
bar: 'link:../bar',
|
|
},
|
|
specifiers: {
|
|
bar: 'link:../bar',
|
|
},
|
|
},
|
|
},
|
|
}, false)).toStrictEqual({
|
|
lockfileVersion: LOCKFILE_VERSION,
|
|
onlyBuiltDependencies: [],
|
|
importers: {
|
|
foo: {
|
|
dependencies: {
|
|
bar: 'link:../bar',
|
|
},
|
|
specifiers: {
|
|
bar: 'link:../bar',
|
|
},
|
|
},
|
|
},
|
|
})
|
|
})
|