mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
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:
@@ -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}) {
|
||||
};
|
||||
}
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user