test: group browserType.launchServer tests (#2944)

This commit is contained in:
Darío Kondratiuk 2020-07-17 00:33:40 -03:00 committed by GitHub
parent 16e3776a9c
commit fe95ee00c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,21 +81,6 @@ describe('Playwright', function() {
});
});
describe('browserType.launchServer', function() {
it('should return child_process instance', async ({browserType, defaultBrowserOptions}) => {
const browserServer = await browserType.launchServer(defaultBrowserOptions);
expect(browserServer.process().pid).toBeGreaterThan(0);
await browserServer.close();
});
it('should fire close event', async ({browserType, defaultBrowserOptions}) => {
const browserServer = await browserType.launchServer(defaultBrowserOptions);
await Promise.all([
new Promise(f => browserServer.on('close', f)),
browserServer.close(),
]);
});
});
describe('browserType.executablePath', function() {
it('should work', async({browserType}) => {
const executablePath = browserType.executablePath();
@ -281,6 +266,18 @@ describe('browserType.launchServer', function() {
]);
expect(order).toEqual(['closed', 'killed']);
});
it('should return child_process instance', async ({browserType, defaultBrowserOptions}) => {
const browserServer = await browserType.launchServer(defaultBrowserOptions);
expect(browserServer.process().pid).toBeGreaterThan(0);
await browserServer.close();
});
it('should fire close event', async ({browserType, defaultBrowserOptions}) => {
const browserServer = await browserType.launchServer(defaultBrowserOptions);
await Promise.all([
new Promise(f => browserServer.on('close', f)),
browserServer.close(),
]);
});
});
describe('browserType.connect', function() {