Skip to content

Commit d528bfe

Browse files
committed
test(registry): verify owner navigation paths exist
1 parent 3b9e8d1 commit d528bfe

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

‎packages/command-registry/src/__tests__/owner-files.test.ts‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { existsSync } from 'node:fs';
12
import { describe, expect, test } from 'vitest';
23
import { commandDescriptors } from '../registry.ts';
34
import { COMMAND_OWNER_FILES, ownerFilesForCommand } from '../owner-files.ts';
@@ -9,9 +10,13 @@ describe('command owner-file projection', () => {
910
expect(declared).toEqual(registered);
1011
});
1112

12-
test('every command maps to a non-empty owner-file list', () => {
13+
test('every command maps to existing owner files', () => {
1314
for (const descriptor of commandDescriptors) {
14-
expect(ownerFilesForCommand(descriptor.name).length).toBeGreaterThan(0);
15+
const files = ownerFilesForCommand(descriptor.name);
16+
expect(files.length).toBeGreaterThan(0);
17+
for (const file of files) {
18+
expect(existsSync(new URL(`../../../../${file}`, import.meta.url)), file).toBe(true);
19+
}
1520
}
1621
});
1722

0 commit comments

Comments
 (0)