test(aio): increase docs-test
timeouts to prevent flakes on Travis (#22261)
PR Close #22261
This commit is contained in:
parent
5f52ea3d06
commit
6b457843b9
@ -5,8 +5,15 @@ const {generateDocs} = require('./index.js');
|
|||||||
const { DOCS_OUTPUT_PATH } = require('../config');
|
const { DOCS_OUTPUT_PATH } = require('../config');
|
||||||
|
|
||||||
describe('authors-package (integration tests)', () => {
|
describe('authors-package (integration tests)', () => {
|
||||||
|
let originalJasmineTimeout;
|
||||||
let files;
|
let files;
|
||||||
|
|
||||||
|
beforeAll(() => {
|
||||||
|
originalJasmineTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
|
||||||
|
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
|
||||||
|
});
|
||||||
|
afterAll(() => jasmine.DEFAULT_TIMEOUT_INTERVAL = originalJasmineTimeout);
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
files = [];
|
files = [];
|
||||||
spyOn(fs, 'writeFile').and.callFake((file, content, callback) => {
|
spyOn(fs, 'writeFile').and.callFake((file, content, callback) => {
|
||||||
@ -24,7 +31,7 @@ describe('authors-package (integration tests)', () => {
|
|||||||
expect(files).toContain(resolve(DOCS_OUTPUT_PATH, '../resources.json'));
|
expect(files).toContain(resolve(DOCS_OUTPUT_PATH, '../resources.json'));
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
}, 4000);
|
});
|
||||||
|
|
||||||
it('should generate tutorial docs if the "fileChanged" is a tutorial doc', (done) => {
|
it('should generate tutorial docs if the "fileChanged" is a tutorial doc', (done) => {
|
||||||
generateDocs('aio/content/tutorial/toh-pt5.md', { silent: true }).then(() => {
|
generateDocs('aio/content/tutorial/toh-pt5.md', { silent: true }).then(() => {
|
||||||
@ -32,7 +39,7 @@ describe('authors-package (integration tests)', () => {
|
|||||||
expect(files).toContain(resolve(DOCS_OUTPUT_PATH, 'tutorial/toh-pt5.json'));
|
expect(files).toContain(resolve(DOCS_OUTPUT_PATH, 'tutorial/toh-pt5.json'));
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
}, 4000);
|
});
|
||||||
|
|
||||||
it('should generate tutorial docs if the "fileChanged" is the tutorial index', (done) => {
|
it('should generate tutorial docs if the "fileChanged" is the tutorial index', (done) => {
|
||||||
generateDocs('aio/content/tutorial/index.md', { silent: true }).then(() => {
|
generateDocs('aio/content/tutorial/index.md', { silent: true }).then(() => {
|
||||||
@ -40,7 +47,7 @@ describe('authors-package (integration tests)', () => {
|
|||||||
expect(files).toContain(resolve(DOCS_OUTPUT_PATH, 'tutorial.json'));
|
expect(files).toContain(resolve(DOCS_OUTPUT_PATH, 'tutorial.json'));
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
}, 4000);
|
});
|
||||||
|
|
||||||
it('should generate tutorial docs if the "fileChanged" is a tutorial example', (done) => {
|
it('should generate tutorial docs if the "fileChanged" is a tutorial example', (done) => {
|
||||||
generateDocs('aio/content/examples/toh-pt3/app/app.component.1.html', { silent: true }).then(() => {
|
generateDocs('aio/content/examples/toh-pt3/app/app.component.1.html', { silent: true }).then(() => {
|
||||||
@ -48,7 +55,7 @@ describe('authors-package (integration tests)', () => {
|
|||||||
expect(files).toContain(resolve(DOCS_OUTPUT_PATH, 'tutorial/toh-pt3.json'));
|
expect(files).toContain(resolve(DOCS_OUTPUT_PATH, 'tutorial/toh-pt3.json'));
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
}, 4000);
|
});
|
||||||
|
|
||||||
it('should generate guide doc if the "fileChanged" is a guide doc', (done) => {
|
it('should generate guide doc if the "fileChanged" is a guide doc', (done) => {
|
||||||
generateDocs('aio/content/guide/architecture.md', { silent: true }).then(() => {
|
generateDocs('aio/content/guide/architecture.md', { silent: true }).then(() => {
|
||||||
@ -56,7 +63,7 @@ describe('authors-package (integration tests)', () => {
|
|||||||
expect(files).toContain(resolve(DOCS_OUTPUT_PATH, 'guide/architecture.json'));
|
expect(files).toContain(resolve(DOCS_OUTPUT_PATH, 'guide/architecture.json'));
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
}, 4000);
|
});
|
||||||
|
|
||||||
it('should generate guide doc if the "fileChanged" is a guide example', (done) => {
|
it('should generate guide doc if the "fileChanged" is a guide example', (done) => {
|
||||||
generateDocs('aio/content/examples/architecture/src/app/app.module.ts', { silent: true }).then(() => {
|
generateDocs('aio/content/examples/architecture/src/app/app.module.ts', { silent: true }).then(() => {
|
||||||
@ -64,7 +71,7 @@ describe('authors-package (integration tests)', () => {
|
|||||||
expect(files).toContain(resolve(DOCS_OUTPUT_PATH, 'guide/architecture.json'));
|
expect(files).toContain(resolve(DOCS_OUTPUT_PATH, 'guide/architecture.json'));
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
}, 4000);
|
});
|
||||||
|
|
||||||
it('should generate API doc if the "fileChanged" is an API doc', (done) => {
|
it('should generate API doc if the "fileChanged" is an API doc', (done) => {
|
||||||
generateDocs('packages/forms/src/form_builder.ts', { silent: true }).then(() => {
|
generateDocs('packages/forms/src/form_builder.ts', { silent: true }).then(() => {
|
||||||
@ -81,4 +88,4 @@ describe('authors-package (integration tests)', () => {
|
|||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
}, 16000);
|
}, 16000);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user