Skip to content

Commit fe95ee0

Browse files
authored
test: group browserType.launchServer tests (#2944)
1 parent 16e3776 commit fe95ee0

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

test/launcher.spec.js

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -81,21 +81,6 @@ describe('Playwright', function() {
8181
});
8282
});
8383

84-
describe('browserType.launchServer', function() {
85-
it('should return child_process instance', async ({browserType, defaultBrowserOptions}) => {
86-
const browserServer = await browserType.launchServer(defaultBrowserOptions);
87-
expect(browserServer.process().pid).toBeGreaterThan(0);
88-
await browserServer.close();
89-
});
90-
it('should fire close event', async ({browserType, defaultBrowserOptions}) => {
91-
const browserServer = await browserType.launchServer(defaultBrowserOptions);
92-
await Promise.all([
93-
new Promise(f => browserServer.on('close', f)),
94-
browserServer.close(),
95-
]);
96-
});
97-
});
98-
9984
describe('browserType.executablePath', function() {
10085
it('should work', async({browserType}) => {
10186
const executablePath = browserType.executablePath();
@@ -281,6 +266,18 @@ describe('browserType.launchServer', function() {
281266
]);
282267
expect(order).toEqual(['closed', 'killed']);
283268
});
269+
it('should return child_process instance', async ({browserType, defaultBrowserOptions}) => {
270+
const browserServer = await browserType.launchServer(defaultBrowserOptions);
271+
expect(browserServer.process().pid).toBeGreaterThan(0);
272+
await browserServer.close();
273+
});
274+
it('should fire close event', async ({browserType, defaultBrowserOptions}) => {
275+
const browserServer = await browserType.launchServer(defaultBrowserOptions);
276+
await Promise.all([
277+
new Promise(f => browserServer.on('close', f)),
278+
browserServer.close(),
279+
]);
280+
});
284281
});
285282

286283
describe('browserType.connect', function() {

0 commit comments

Comments
 (0)