diff --git a/test/whats-new.test.ts b/test/whats-new.test.ts index 95c4ba84..435de7cb 100644 --- a/test/whats-new.test.ts +++ b/test/whats-new.test.ts @@ -54,11 +54,13 @@ describe('whats-new extraction', () => { }); describe('shipped whats-new.json', () => { - it('matches the package version and has highlights, so the release announces itself', () => { + it("matches the package version, so a release cannot ship the previous release's notes", () => { const pkg = JSON.parse(readFileSync(resolve(root, 'package.json'), 'utf8')); const notes = JSON.parse(readFileSync(resolve(root, 'src/web/public/whats-new.json'), 'utf8')); expect(notes.version).toBe(pkg.version); - expect(notes.highlights.length).toBeGreaterThan(0); + // A release written without bold lead-ins legitimately has none (the client then stays + // quiet), so an empty list must not turn the release commit's CI red. + expect(Array.isArray(notes.highlights)).toBe(true); }); it('is regenerated by the release script and consumed once per version by the client', () => {