diff --git a/tests/unit/dev-release-manifest.test.ts b/tests/unit/dev-release-manifest.test.ts index 061abbff..9eaee1d9 100644 --- a/tests/unit/dev-release-manifest.test.ts +++ b/tests/unit/dev-release-manifest.test.ts @@ -43,14 +43,22 @@ describe("dev release manifest", () => { expect(written["contractSet"]).toEqual(JSON.parse(JSON.stringify(buildContractSet()))); }); - it("matches the committed placeholder while the template's own features are installed", async () => { + it("keeps every other field of the committed placeholder", async () => { directory = await mkdtemp(path.join(tmpdir(), "dev-release-manifest-")); const output = path.join(directory, "dev-release-manifest.json"); await writeDevReleaseManifest("public/release-manifest.json", output); - expect(JSON.parse(await readFile(output, "utf8"))).toEqual( - JSON.parse(await readFile("public/release-manifest.json", "utf8")), - ); + // Whatever features are installed (a product's, or a drill's generated + // one): only the contract set may differ from the placeholder. + const { contractSet, ...written } = JSON.parse(await readFile(output, "utf8")) as Record< + string, + unknown + >; + const { contractSet: _placeholderSet, ...placeholder } = JSON.parse( + await readFile("public/release-manifest.json", "utf8"), + ) as Record; + expect(written).toEqual(placeholder); + expect(contractSet).toEqual(JSON.parse(JSON.stringify(buildContractSet()))); }); });