diff --git a/pkg-manager/plugin-commands-installation/test/catalog.ts b/pkg-manager/plugin-commands-installation/test/catalog.ts index 7a884c80d4a..78b8c287b6b 100644 --- a/pkg-manager/plugin-commands-installation/test/catalog.ts +++ b/pkg-manager/plugin-commands-installation/test/catalog.ts @@ -333,3 +333,40 @@ test('lockfile catalog snapshots should keep unused entries', async () => { }) } }) + +test.skip('throws frozen-lockfile error if catalog is modified', async () => { + await using ctrl = new CatalogTestsController([ + { + location: 'packages/project1', + package: { + dependencies: { + 'is-positive': 'catalog:', + }, + }, + }, + ]) + + await ctrl.writeWorkspaceYml({ + packages: ['packages/*'], + catalog: { 'is-positive': '=1.0.0' }, + }) + await ctrl.install() + + expect((await ctrl.lockfile()).importers['packages/project1']).toEqual({ + dependencies: { + 'is-positive': { + specifier: 'catalog:', + version: '1.0.0', + }, + }, + }) + + await ctrl.writeWorkspaceYml({ + packages: ['packages/*'], + catalog: { + 'is-positive': '=3.1.0', + }, + }) + + await expect(() => ctrl.install({ frozenLockfile: true })).rejects.toThrow() +})