Move docs directory validation to after copying README.md
Signed-off-by: Ruslans Tarasovs <ruslan@tarasovs.com>
This commit is contained in:
committed by
Ruslans Tarasovs
parent
fd1854e3bc
commit
6ce84626ab
@@ -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'],
|
||||
{
|
||||
legacyCwd,
|
||||
timeout,
|
||||
},
|
||||
);
|
||||
expect(proc.stdout).toContain('Successfully generated docs');
|
||||
expect(proc.exit).toEqual(0);
|
||||
});
|
||||
|
||||
it('can serve in mkdocs', async () => {
|
||||
const proc = await executeCommand(
|
||||
entryPoint,
|
||||
|
||||
Reference in New Issue
Block a user