playwright/packages/installation-tests/sanity.js
Andrey Lushnikov 37ec3a6ae6
fix(types): properly export typescript types from packages (#2364)
Drive-by: move package tests from `//test/installation-tests` to
`//packages/installation-tests`

Fix #2349
2020-05-26 17:19:05 -07:00

18 lines
473 B
JavaScript

const requireName = process.argv[2];
const browsers = process.argv.slice(3);
const playwright = require(requireName);
(async () => {
for (const browserType of browsers) {
const browser = await playwright[browserType].launch();
const context = await browser.newContext();
const page = await context.newPage();
await page.evaluate(() => navigator.userAgent);
await browser.close();
}
})().catch(err => {
console.error(err);
process.exit(1);
});