Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

test: group browserType.launchServer tests (#2944)

Darío Kondratiukfe95ee00c39c
diff --git a/test/launcher.spec.js b/test/launcher.spec.js
index 47cd56230f..88f4c7166a 100644
--- a/test/launcher.spec.js
+++ b/test/launcher.spec.js
@@ -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() {