test: flatten tests (#2337)

Today, we have tests split into multiple files, with files pulling
tests from some other files.

This patch starts explicitly gathering all tests from the same
`test.js` file.

Drive-By: move one test from `browser.spec.js` into `puppeteer.spec.js`
since it starts browser itself.
This commit is contained in:
Andrey Lushnikov
2018-04-09 16:38:00 -07:00
committed by GitHub
parent 06d61919ef
commit 5d106f79d8
9 changed files with 1829 additions and 1852 deletions

View File

@@ -17,11 +17,10 @@
const path = require('path');
const utils = require('./utils');
module.exports.addTests = function({testRunner, expect, PROJECT_ROOT}) {
module.exports.addTests = function({testRunner, expect, DeviceDescriptors}) {
const {describe, xdescribe, fdescribe} = testRunner;
const {it, fit, xit} = testRunner;
const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;
const DeviceDescriptors = require(path.join(PROJECT_ROOT, 'DeviceDescriptors'));
const iPhone = DeviceDescriptors['iPhone 6'];
describe('input', function() {
it('should click the button', async({page, server}) => {
@@ -441,4 +440,4 @@ module.exports.addTests = function({testRunner, expect, PROJECT_ROOT}) {
};
}
});
};
};