Files
pnpm/packages/lockfile-file/test/normalizeLockfile.test.ts
Zoltan Kochan 9ad8c27bf0 feat: ignoring the build of specific dependencies (#3080)
* feat: ignoring the build of specific dependencies

close #3071

* test: add test for neverBuiltDependencies

* docs: add changesets

* test: lockfile-file
2021-01-23 16:27:39 +02:00

34 lines
780 B
TypeScript

import { LOCKFILE_VERSION } from '@pnpm/constants'
import { normalizeLockfile } from '@pnpm/lockfile-file/lib/write'
test('empty overrides and neverBuiltDependencies are removed during lockfile normalization', () => {
expect(normalizeLockfile({
lockfileVersion: LOCKFILE_VERSION,
overrides: {},
neverBuiltDependencies: [],
packages: {},
importers: {
foo: {
dependencies: {
bar: 'link:../bar',
},
specifiers: {
bar: 'link:../bar',
},
},
},
}, false)).toStrictEqual({
lockfileVersion: LOCKFILE_VERSION,
importers: {
foo: {
dependencies: {
bar: 'link:../bar',
},
specifiers: {
bar: 'link:../bar',
},
},
},
})
})