test: add a test for arbitrary options (#2977)

We should be able to accept unexpected properties in options objects.
This commit is contained in:
Dmitry Gozman 2020-07-16 12:21:36 -07:00 committed by GitHub
parent ecc130c644
commit 513899a3b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,7 @@
const path = require('path');
const fs = require('fs');
const utils = require('./utils');
const {FFOX, CHROMIUM, WEBKIT, WIN, USES_HOOKS} = utils.testOptions(browserType);
const {FFOX, CHROMIUM, WEBKIT, WIN, USES_HOOKS, CHANNEL} = utils.testOptions(browserType);
describe('Playwright', function() {
describe('browserType.launch', function() {
@ -75,6 +75,10 @@ describe('Playwright', function() {
const error = await browserType.launch(options).catch(e => e);
expect(error.message).toContain('<launching>');
});
it.slow().skip(CHANNEL)('should accept objects as options', async({browserType, defaultBrowserOptions}) => {
const browser = await browserType.launch({ ...defaultBrowserOptions, process });
await browser.close();
});
});
describe('browserType.launchServer', function() {