Merge pull request #33370 from rtar/master

fix(plugin-techdocs-node): Move docs directory validation to after copying README.md
This commit is contained in:
Andre Wanlin
2026-05-05 06:02:44 -05:00
committed by GitHub
6 changed files with 149 additions and 5 deletions
@@ -60,6 +60,7 @@ jest.setTimeout(timeout * 2);
describe('end-to-end', () => {
const cwd = path.resolve(__dirname, '../src/example-docs');
const legacyCwd = path.resolve(__dirname, '../src/legacy-docs');
const entryPoint = path.resolve(__dirname, '../bin/techdocs-cli');
afterEach(async () => {
@@ -106,6 +107,19 @@ describe('end-to-end', () => {
expect(proc.exit).toEqual(0);
});
it('can generate with --legacyCopyReadmeMdToIndexMd option', async () => {
const proc = await executeCommand(
entryPoint,
['generate', '--no-docker', '--legacyCopyReadmeMdToIndexMd'],
{
cwd: legacyCwd,
timeout: timeout,
},
);
expect(proc.stdout).toContain('Successfully generated docs');
expect(proc.exit).toEqual(0);
});
it('can serve in mkdocs', async () => {
const proc = await executeCommand(
entryPoint,
@@ -0,0 +1 @@
Very simple file to test that `--legacyCopyReadmeMdToIndexMd` option works