@web/test-runner-chrome
Advanced tools
Comparing version 0.15.0 to 0.16.0
import * as puppeteerCore from 'puppeteer-core'; | ||
import { Browser, Page, PuppeteerNodeLaunchOptions, BrowserContext } from 'puppeteer-core'; | ||
import { BrowserLauncher, TestRunnerCoreConfig } from '@web/test-runner-core'; | ||
import { ChromeLauncherPage } from './ChromeLauncherPage'; | ||
import { ChromeLauncherPage } from './ChromeLauncherPage.js'; | ||
interface CreateArgs { | ||
@@ -6,0 +6,0 @@ browser: Browser; |
@@ -5,4 +5,4 @@ "use strict"; | ||
const puppeteer_core_1 = require("puppeteer-core"); | ||
const findExecutablePath_1 = require("./findExecutablePath"); | ||
const ChromeLauncherPage_1 = require("./ChromeLauncherPage"); | ||
const findExecutablePath_js_1 = require("./findExecutablePath.js"); | ||
const ChromeLauncherPage_js_1 = require("./ChromeLauncherPage.js"); | ||
function capitalize(str) { | ||
@@ -45,3 +45,3 @@ return `${str[0].toUpperCase()}${str.substring(1)}`; | ||
launchBrowser(options = {}) { | ||
const mergedOptions = Object.assign(Object.assign({ headless: 'new' }, this.launchOptions), options); | ||
const mergedOptions = Object.assign(Object.assign({ headless: true }, this.launchOptions), options); | ||
if (this.customPuppeteer) { | ||
@@ -62,3 +62,3 @@ // launch using a custom puppeteer instance | ||
if (!this.cachedExecutablePath) { | ||
this.cachedExecutablePath = (0, findExecutablePath_1.findExecutablePath)(); | ||
this.cachedExecutablePath = (0, findExecutablePath_js_1.findExecutablePath)(); | ||
} | ||
@@ -134,3 +134,3 @@ mergedOptions.executablePath = this.cachedExecutablePath; | ||
}); | ||
return new ChromeLauncherPage_1.ChromeLauncherPage(this.config, this.testFiles, (_b = (_a = this.launchOptions) === null || _a === void 0 ? void 0 : _a.product) !== null && _b !== void 0 ? _b : 'chromium', await puppeteerPagePromise); | ||
return new ChromeLauncherPage_js_1.ChromeLauncherPage(this.config, this.testFiles, (_b = (_a = this.launchOptions) === null || _a === void 0 ? void 0 : _a.product) !== null && _b !== void 0 ? _b : 'chromium', await puppeteerPagePromise); | ||
} | ||
@@ -137,0 +137,0 @@ async stopSession(sessionId) { |
import * as puppeteerCore from 'puppeteer-core'; | ||
import { ChromeLauncher, CreateBrowserContextFn, CreatePageFn } from './ChromeLauncher'; | ||
import { PuppeteerNodeLaunchOptions, devices } from 'puppeteer-core'; | ||
import { ChromeLauncher, CreateBrowserContextFn, CreatePageFn } from './ChromeLauncher.js'; | ||
import { PuppeteerNodeLaunchOptions } from 'puppeteer-core'; | ||
export interface ChromeLauncherArgs { | ||
@@ -11,4 +11,4 @@ puppeteer?: typeof puppeteerCore; | ||
} | ||
export { ChromeLauncher, devices, puppeteerCore }; | ||
export { ChromeLauncher, puppeteerCore }; | ||
export declare function chromeLauncher(args?: ChromeLauncherArgs): ChromeLauncher; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -26,14 +26,12 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.chromeLauncher = exports.puppeteerCore = exports.devices = exports.ChromeLauncher = void 0; | ||
exports.chromeLauncher = exports.puppeteerCore = exports.ChromeLauncher = void 0; | ||
const puppeteerCore = __importStar(require("puppeteer-core")); | ||
exports.puppeteerCore = puppeteerCore; | ||
const ChromeLauncher_1 = require("./ChromeLauncher"); | ||
Object.defineProperty(exports, "ChromeLauncher", { enumerable: true, get: function () { return ChromeLauncher_1.ChromeLauncher; } }); | ||
const puppeteer_core_1 = require("puppeteer-core"); | ||
Object.defineProperty(exports, "devices", { enumerable: true, get: function () { return puppeteer_core_1.devices; } }); | ||
const ChromeLauncher_js_1 = require("./ChromeLauncher.js"); | ||
Object.defineProperty(exports, "ChromeLauncher", { enumerable: true, get: function () { return ChromeLauncher_js_1.ChromeLauncher; } }); | ||
function chromeLauncher(args = {}) { | ||
const { launchOptions = {}, createBrowserContext = ({ browser }) => browser.defaultBrowserContext(), createPage = ({ context }) => context.newPage(), puppeteer, concurrency, } = args; | ||
return new ChromeLauncher_1.ChromeLauncher(launchOptions, createBrowserContext, createPage, puppeteer, concurrency); | ||
return new ChromeLauncher_js_1.ChromeLauncher(launchOptions, createBrowserContext, createPage, puppeteer, concurrency); | ||
} | ||
exports.chromeLauncher = chromeLauncher; | ||
//# sourceMappingURL=index.js.map |
// this file is autogenerated with the generate-mjs-dts-entrypoints script | ||
export * from './dist/index'; | ||
export * from './dist/index.js'; |
{ | ||
"name": "@web/test-runner-chrome", | ||
"version": "0.15.0", | ||
"version": "0.16.0", | ||
"publishConfig": { | ||
@@ -29,3 +29,3 @@ "access": "public" | ||
"build": "tsc", | ||
"test": "mocha test/**/*.test.ts --require ts-node/register", | ||
"test:node": "mocha test/**/*.test.ts --require ts-node/register --reporter dot", | ||
"test:watch": "mocha test/**/*.test.ts --require ts-node/register --watch --watch-files src,test" | ||
@@ -54,3 +54,3 @@ }, | ||
"chrome-launcher": "^0.15.0", | ||
"puppeteer-core": "^20.0.0" | ||
"puppeteer-core": "^22.0.0" | ||
}, | ||
@@ -57,0 +57,0 @@ "devDependencies": { |
@@ -10,4 +10,4 @@ import * as puppeteerCore from 'puppeteer-core'; | ||
import { BrowserLauncher, TestRunnerCoreConfig } from '@web/test-runner-core'; | ||
import { findExecutablePath } from './findExecutablePath'; | ||
import { ChromeLauncherPage } from './ChromeLauncherPage'; | ||
import { findExecutablePath } from './findExecutablePath.js'; | ||
import { ChromeLauncherPage } from './ChromeLauncherPage.js'; | ||
@@ -84,3 +84,3 @@ function capitalize(str: string) { | ||
const mergedOptions: PuppeteerNodeLaunchOptions = { | ||
headless: 'new', | ||
headless: true, | ||
...this.launchOptions, | ||
@@ -87,0 +87,0 @@ ...options, |
import * as puppeteerCore from 'puppeteer-core'; | ||
import { ChromeLauncher, CreateBrowserContextFn, CreatePageFn } from './ChromeLauncher'; | ||
import { PuppeteerNodeLaunchOptions, devices } from 'puppeteer-core'; | ||
import { ChromeLauncher, CreateBrowserContextFn, CreatePageFn } from './ChromeLauncher.js'; | ||
import { PuppeteerNodeLaunchOptions } from 'puppeteer-core'; | ||
@@ -13,3 +13,3 @@ export interface ChromeLauncherArgs { | ||
export { ChromeLauncher, devices, puppeteerCore }; | ||
export { ChromeLauncher, puppeteerCore }; | ||
@@ -16,0 +16,0 @@ export function chromeLauncher(args: ChromeLauncherArgs = {}) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
49305
789
+ Added@puppeteer/browsers@2.3.0(transitive)
+ Addedbare-fs@4.0.1(transitive)
+ Addedbare-os@3.4.0(transitive)
+ Addedbare-path@3.0.0(transitive)
+ Addedbare-stream@2.6.5(transitive)
+ Addedchromium-bidi@0.6.3(transitive)
+ Addeddevtools-protocol@0.0.1312386(transitive)
+ Addedmitt@3.0.1(transitive)
+ Addedproxy-agent@6.5.0(transitive)
+ Addedpuppeteer-core@22.15.0(transitive)
+ Addedtar-fs@3.0.8(transitive)
+ Addedurlpattern-polyfill@10.0.0(transitive)
+ Addedws@8.18.0(transitive)
+ Addedyargs@17.7.2(transitive)
+ Addedzod@3.23.8(transitive)
- Removed@puppeteer/browsers@1.4.6(transitive)
- Removedchromium-bidi@0.4.16(transitive)
- Removedcross-fetch@4.0.0(transitive)
- Removeddebug@4.3.4(transitive)
- Removeddevtools-protocol@0.0.1147663(transitive)
- Removedmitt@3.0.0(transitive)
- Removedmkdirp-classic@0.5.3(transitive)
- Removedms@2.1.2(transitive)
- Removednode-fetch@2.7.0(transitive)
- Removedproxy-agent@6.3.0(transitive)
- Removedpuppeteer-core@20.9.0(transitive)
- Removedtar-fs@3.0.4(transitive)
- Removedtr46@0.0.3(transitive)
- Removedwebidl-conversions@3.0.1(transitive)
- Removedwhatwg-url@5.0.0(transitive)
- Removedws@8.13.0(transitive)
- Removedyargs@17.7.1(transitive)
Updatedpuppeteer-core@^22.0.0