Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

fix(cli): remove cli-reference from docs tests (#1918)

Cindy Zhanga79b2d439f67
diff --git a/packages/cli/src/commands/docs.test.mjs b/packages/cli/src/commands/docs.test.mjs
index ee3561c244..6798aadf7f 100644
--- a/packages/cli/src/commands/docs.test.mjs
+++ b/packages/cli/src/commands/docs.test.mjs
@@ -51,28 +51,26 @@ describe('registerDocs', () => {
});
describe('hyphenated doc filenames', () => {
- it('lists hyphenated topics like cli-reference', async () => {
+ it('lists hyphenated topics like getting-started', async () => {
const program = createProgram();
await program.parseAsync(['node', 'xds', 'docs']);
const output = console.log.mock.calls.map(c => c[0]).join('\n');
- expect(output).toContain('cli-reference');
expect(output).toContain('getting-started');
});
it('loads a hyphenated topic by name', async () => {
const program = createProgram();
- await program.parseAsync(['node', 'xds', 'docs', 'cli-reference']);
+ await program.parseAsync(['node', 'xds', 'docs', 'getting-started']);
const output = console.log.mock.calls.map(c => c[0]).join('\n');
- // cli-reference doc should have real content, not an error
expect(output.length).toBeGreaterThan(0);
expect(console.error).not.toHaveBeenCalled();
});
it('returns docs.detail via API for hyphenated topic', async () => {
const {docs: docsApi} = await import('../api/docs.mjs');
- const result = await docsApi('cli-reference');
+ const result = await docsApi('getting-started');
expect(result.type).toBe('docs.detail');
expect(result.data).toBeDefined();
expect(result.data.description).toBeDefined();