fix(techdocs-cli): cross-platform build script
Co-authored-by: Emma Indal <emma.indahl@gmail.com> Signed-off-by: Camila Belo <camilaibs@gmail.com>
This commit is contained in:
@@ -77,8 +77,8 @@ export default async function serve(cmd: Command) {
|
||||
|
||||
// Wait until mkdocs server has started so that Backstage starts with docs loaded
|
||||
// Takes 1-5 seconds
|
||||
for (let attempt = 0; attempt < 10; attempt++) {
|
||||
await new Promise(r => setTimeout(r, 1000));
|
||||
for (let attempt = 0; attempt < 30; attempt++) {
|
||||
await new Promise(r => setTimeout(r, 3000));
|
||||
if (mkdocsServerHasStarted) {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ const FIXTURE_DIR = path.resolve(PROJECT_ROOT_DIR, 'src/fixture');
|
||||
|
||||
describe('end-to-end', () => {
|
||||
it('shows help text', async () => {
|
||||
jest.setTimeout(10000);
|
||||
jest.setTimeout(30000);
|
||||
const proc = await executeTechDocsCliCommand(['--help']);
|
||||
|
||||
expect(proc.combinedStdOutErr).toContain('Usage: techdocs-cli [options]');
|
||||
@@ -30,10 +30,10 @@ describe('end-to-end', () => {
|
||||
});
|
||||
|
||||
it('can generate', async () => {
|
||||
jest.setTimeout(10000);
|
||||
jest.setTimeout(30000);
|
||||
const proc = await executeTechDocsCliCommand(['generate', '--no-docker'], {
|
||||
cwd: FIXTURE_DIR,
|
||||
killAfter: 8000,
|
||||
killAfter: 16000,
|
||||
});
|
||||
|
||||
expect(proc.combinedStdOutErr).toContain('Successfully generated docs');
|
||||
@@ -41,12 +41,12 @@ describe('end-to-end', () => {
|
||||
});
|
||||
|
||||
it('can serve in mkdocs', async () => {
|
||||
jest.setTimeout(10000);
|
||||
jest.setTimeout(30000);
|
||||
const proc = await executeTechDocsCliCommand(
|
||||
['serve:mkdocs', '--no-docker'],
|
||||
{
|
||||
cwd: FIXTURE_DIR,
|
||||
killAfter: 8000,
|
||||
killAfter: 16000,
|
||||
},
|
||||
);
|
||||
|
||||
@@ -55,10 +55,10 @@ describe('end-to-end', () => {
|
||||
});
|
||||
|
||||
it('can serve in backstage', async () => {
|
||||
jest.setTimeout(10000);
|
||||
jest.setTimeout(30000);
|
||||
const proc = await executeTechDocsCliCommand(['serve', '--no-docker'], {
|
||||
cwd: FIXTURE_DIR,
|
||||
killAfter: 8000,
|
||||
killAfter: 16000,
|
||||
});
|
||||
|
||||
expect(proc.combinedStdOutErr).toContain('Starting mkdocs server');
|
||||
|
||||
@@ -40,6 +40,7 @@ export const runMkdocsServer = async (options: {
|
||||
`${process.cwd()}:/content`,
|
||||
'-p',
|
||||
`${port}:${port}`,
|
||||
'-it',
|
||||
dockerImage,
|
||||
'serve',
|
||||
'--dev-addr',
|
||||
|
||||
Reference in New Issue
Block a user