Movee api test timeout into CLI args
This commit is contained in:
@@ -16,7 +16,6 @@ const height = 600;
|
|||||||
|
|
||||||
describe('AttachAddon', () => {
|
describe('AttachAddon', () => {
|
||||||
before(async function(): Promise<any> {
|
before(async function(): Promise<any> {
|
||||||
this.timeout(20000);
|
|
||||||
browser = await getBrowserType().launch({
|
browser = await getBrowserType().launch({
|
||||||
headless: process.argv.indexOf('--headless') !== -1,
|
headless: process.argv.indexOf('--headless') !== -1,
|
||||||
args: [`--window-size=${width},${height}`, `--no-sandbox`]
|
args: [`--window-size=${width},${height}`, `--no-sandbox`]
|
||||||
@@ -29,13 +28,9 @@ describe('AttachAddon', () => {
|
|||||||
await browser.close();
|
await browser.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(async function(): Promise<any> {
|
beforeEach(async () => await page.goto(APP));
|
||||||
this.timeout(20000);
|
|
||||||
await page.goto(APP);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('string', async function(): Promise<any> {
|
it('string', async function(): Promise<any> {
|
||||||
this.timeout(20000);
|
|
||||||
await openTerminal(page, { rendererType: 'dom' });
|
await openTerminal(page, { rendererType: 'dom' });
|
||||||
const port = 8080;
|
const port = 8080;
|
||||||
const server = new WebSocket.Server({ port });
|
const server = new WebSocket.Server({ port });
|
||||||
@@ -46,7 +41,6 @@ describe('AttachAddon', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('utf8', async function(): Promise<any> {
|
it('utf8', async function(): Promise<any> {
|
||||||
this.timeout(20000);
|
|
||||||
await openTerminal(page, { rendererType: 'dom' });
|
await openTerminal(page, { rendererType: 'dom' });
|
||||||
const port = 8080;
|
const port = 8080;
|
||||||
const server = new WebSocket.Server({ port });
|
const server = new WebSocket.Server({ port });
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ let isFirefox = false;
|
|||||||
|
|
||||||
describe('FitAddon', () => {
|
describe('FitAddon', () => {
|
||||||
before(async function(): Promise<any> {
|
before(async function(): Promise<any> {
|
||||||
this.timeout(20000);
|
|
||||||
browser = await getBrowserType().launch({
|
browser = await getBrowserType().launch({
|
||||||
headless: process.argv.indexOf('--headless') !== -1,
|
headless: process.argv.indexOf('--headless') !== -1,
|
||||||
args: [`--window-size=${width},${height}`, `--no-sandbox`]
|
args: [`--window-size=${width},${height}`, `--no-sandbox`]
|
||||||
|
|||||||
@@ -17,8 +17,6 @@ const width = 800;
|
|||||||
const height = 600;
|
const height = 600;
|
||||||
|
|
||||||
describe('Search Tests', function(): void {
|
describe('Search Tests', function(): void {
|
||||||
this.timeout(20000);
|
|
||||||
|
|
||||||
before(async function(): Promise<any> {
|
before(async function(): Promise<any> {
|
||||||
browser = await getBrowserType().launch({
|
browser = await getBrowserType().launch({
|
||||||
headless: process.argv.indexOf('--headless') !== -1,
|
headless: process.argv.indexOf('--headless') !== -1,
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ const height = 600;
|
|||||||
|
|
||||||
describe('SerializeAddon', () => {
|
describe('SerializeAddon', () => {
|
||||||
before(async function(): Promise<any> {
|
before(async function(): Promise<any> {
|
||||||
this.timeout(20000);
|
|
||||||
browser = await getBrowserType().launch({
|
browser = await getBrowserType().launch({
|
||||||
headless: process.argv.indexOf('--headless') !== -1,
|
headless: process.argv.indexOf('--headless') !== -1,
|
||||||
args: [`--window-size=${width},${height}`]
|
args: [`--window-size=${width},${height}`]
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ const height = 600;
|
|||||||
|
|
||||||
describe('Unicode11Addon', () => {
|
describe('Unicode11Addon', () => {
|
||||||
before(async function(): Promise<any> {
|
before(async function(): Promise<any> {
|
||||||
this.timeout(20000);
|
|
||||||
browser = await getBrowserType().launch({
|
browser = await getBrowserType().launch({
|
||||||
headless: process.argv.indexOf('--headless') !== -1,
|
headless: process.argv.indexOf('--headless') !== -1,
|
||||||
args: [`--window-size=${width},${height}`, `--no-sandbox`]
|
args: [`--window-size=${width},${height}`, `--no-sandbox`]
|
||||||
@@ -30,7 +29,6 @@ describe('Unicode11Addon', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(async function(): Promise<any> {
|
beforeEach(async function(): Promise<any> {
|
||||||
this.timeout(20000);
|
|
||||||
await page.goto(APP);
|
await page.goto(APP);
|
||||||
await openTerminal(page);
|
await openTerminal(page);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ const height = 600;
|
|||||||
|
|
||||||
describe('WebLinksAddon', () => {
|
describe('WebLinksAddon', () => {
|
||||||
before(async function(): Promise<any> {
|
before(async function(): Promise<any> {
|
||||||
this.timeout(10000);
|
|
||||||
browser = await getBrowserType().launch({
|
browser = await getBrowserType().launch({
|
||||||
headless: process.argv.indexOf('--headless') !== -1,
|
headless: process.argv.indexOf('--headless') !== -1,
|
||||||
args: [`--window-size=${width},${height}`, `--no-sandbox`]
|
args: [`--window-size=${width},${height}`, `--no-sandbox`]
|
||||||
@@ -25,27 +24,18 @@ describe('WebLinksAddon', () => {
|
|||||||
await page.setViewport({ width, height });
|
await page.setViewport({ width, height });
|
||||||
});
|
});
|
||||||
|
|
||||||
after(async () => {
|
after(async () => await browser.close());
|
||||||
await browser.close();
|
beforeEach(async () => await page.goto(APP));
|
||||||
});
|
|
||||||
|
|
||||||
beforeEach(async function(): Promise<any> {
|
|
||||||
this.timeout(5000);
|
|
||||||
await page.goto(APP);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('.com', async function(): Promise<any> {
|
it('.com', async function(): Promise<any> {
|
||||||
this.timeout(20000);
|
|
||||||
await testHostName('foo.com');
|
await testHostName('foo.com');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('.com.au', async function(): Promise<any> {
|
it('.com.au', async function(): Promise<any> {
|
||||||
this.timeout(20000);
|
|
||||||
await testHostName('foo.com.au');
|
await testHostName('foo.com.au');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('.io', async function(): Promise<any> {
|
it('.io', async function(): Promise<any> {
|
||||||
this.timeout(20000);
|
|
||||||
await testHostName('foo.io');
|
await testHostName('foo.io');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -17,8 +17,6 @@ const width = 800;
|
|||||||
const height = 600;
|
const height = 600;
|
||||||
|
|
||||||
describe('WebGL Renderer Integration Tests', function(): void {
|
describe('WebGL Renderer Integration Tests', function(): void {
|
||||||
this.timeout(20000);
|
|
||||||
|
|
||||||
const browserType = getBrowserType();
|
const browserType = getBrowserType();
|
||||||
const isHeadless = process.argv.indexOf('--headless') !== -1;
|
const isHeadless = process.argv.indexOf('--headless') !== -1;
|
||||||
const areTestsEnabled = browserType.name() === 'chromium' || (browserType.name() === 'firefox' && !isHeadless);
|
const areTestsEnabled = browserType.name() === 'chromium' || (browserType.name() === 'firefox' && !isHeadless);
|
||||||
|
|||||||
+3
-3
@@ -15,9 +15,9 @@
|
|||||||
"test": "npm run test-unit",
|
"test": "npm run test-unit",
|
||||||
"posttest": "npm run lint",
|
"posttest": "npm run lint",
|
||||||
"test-api": "npm run test-api-chromium",
|
"test-api": "npm run test-api-chromium",
|
||||||
"test-api-chromium": "mocha \"**/*.api.js\" --browser chromium",
|
"test-api-chromium": "mocha \"**/*.api.js\" --browser chromium --timeout 10000",
|
||||||
"test-api-firefox": "mocha \"**/*.api.js\" --browser firefox",
|
"test-api-firefox": "mocha \"**/*.api.js\" --browser firefox --timeout 10000",
|
||||||
"test-api-webkit": "mocha \"**/*.api.js\" --browser webkit",
|
"test-api-webkit": "mocha \"**/*.api.js\" --browser webkit --timeout 10000",
|
||||||
"test-unit": "node ./bin/test.js",
|
"test-unit": "node ./bin/test.js",
|
||||||
"test-unit-coverage": "node ./bin/test.js --coverage",
|
"test-unit-coverage": "node ./bin/test.js --coverage",
|
||||||
"build": "tsc -b ./tsconfig.all.json",
|
"build": "tsc -b ./tsconfig.all.json",
|
||||||
|
|||||||
Reference in New Issue
Block a user