From 7b29666d30913fa6f2a19dc8632bd4f4191d832e Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 19 Aug 2026 06:23:39 +0000 Subject: [PATCH] chore(core): cover duplicate package version audit log Adds a unit test for getDuplicatePackageVersionWarning, raising audit-logs.ts line coverage from 88.88% to 100%. No behavior change. Signed-off-by: Cursor Agent --- projects/core/src/internal/utils/audit-logs.test.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/projects/core/src/internal/utils/audit-logs.test.ts b/projects/core/src/internal/utils/audit-logs.test.ts index ed25ac6066..28f58e9cd5 100644 --- a/projects/core/src/internal/utils/audit-logs.test.ts +++ b/projects/core/src/internal/utils/audit-logs.test.ts @@ -6,6 +6,7 @@ import { DOCS_LOG_URL, getCrossShadowRootAnchorWarning, getDuplicatePackageGlobalVersionWarning, + getDuplicatePackageVersionWarning, getExcessiveInstanceLimitWarning, getIdMatchNotFoundWarning, getInvalidParentWarning, @@ -61,6 +62,14 @@ describe('getCrossShadowRootAnchorWarning', () => { }); }); +describe('getDuplicatePackageVersionWarning', () => { + it('should return warning message for a duplicate localName package version', () => { + expect(getDuplicatePackageVersionWarning('nve-button', '1.2.3')).toBe( + `@nve: Element nve-button version 1.2.3 already defined, please check for duplicate package versions. ${DOCS_LOG_URL}#duplicate-package-version` + ); + }); +}); + describe('getDuplicatePackageGlobalVersionWarning', () => { it('should return warning message for duplicate package version', () => { expect(getDuplicatePackageGlobalVersionWarning()).toBe(