puppeteer-extra-plugin
Advanced tools
Comparing version 3.1.3 to 3.1.4
/*! | ||
* puppeteer-extra-plugin v3.1.2 by berstend | ||
* puppeteer-extra-plugin v3.1.3 by berstend | ||
* https://github.com/berstend/puppeteer-extra/tree/master/packages/puppeteer-extra-plugin | ||
@@ -61,7 +61,3 @@ * @license MIT | ||
this._childClassMembers = []; | ||
this._opts = {}; | ||
// Deep merge opts with defaults, if available | ||
if (Object.keys(this.defaults).length) { | ||
this._opts = merge(this.defaults, opts || {}); | ||
} | ||
this._opts = merge(this.defaults, opts || {}); | ||
this._debugBase('Initialized.'); | ||
@@ -68,0 +64,0 @@ } |
/*! | ||
* puppeteer-extra-plugin v3.1.2 by berstend | ||
* puppeteer-extra-plugin v3.1.3 by berstend | ||
* https://github.com/berstend/puppeteer-extra/tree/master/packages/puppeteer-extra-plugin | ||
@@ -55,7 +55,3 @@ * @license MIT | ||
this._childClassMembers = []; | ||
this._opts = {}; | ||
// Deep merge opts with defaults, if available | ||
if (Object.keys(this.defaults).length) { | ||
this._opts = merge(this.defaults, opts || {}); | ||
} | ||
this._opts = merge(this.defaults, opts || {}); | ||
this._debugBase('Initialized.'); | ||
@@ -62,0 +58,0 @@ } |
@@ -54,7 +54,3 @@ "use strict"; | ||
this._childClassMembers = []; | ||
this._opts = {}; | ||
// Deep merge opts with defaults, if available | ||
if (Object.keys(this.defaults).length) { | ||
this._opts = merge(this.defaults, opts || {}); | ||
} | ||
this._opts = merge(this.defaults, opts || {}); | ||
this._debugBase('Initialized.'); | ||
@@ -61,0 +57,0 @@ } |
@@ -101,2 +101,16 @@ "use strict"; | ||
}); | ||
ava_1.default('should have opts when defaults is not defined', async (t) => { | ||
const pluginName = 'hello-world'; | ||
const userOpts = { foo2: 'bob', extra2: 666 }; | ||
class Plugin extends _1.PuppeteerExtraPlugin { | ||
constructor(opts = {}) { | ||
super(opts); | ||
} | ||
get name() { | ||
return pluginName; | ||
} | ||
} | ||
const instance = new Plugin(userOpts); | ||
t.deepEqual(instance.opts, userOpts); | ||
}); | ||
//# sourceMappingURL=index.test.js.map |
{ | ||
"name": "puppeteer-extra-plugin", | ||
"version": "3.1.3", | ||
"version": "3.1.4", | ||
"description": "Base class for puppeteer-extra plugins.", | ||
@@ -78,3 +78,3 @@ "main": "dist/index.cjs.js", | ||
}, | ||
"gitHead": "6a89e1196bdf8327ee9a2ba8b18f861d9fc209d3" | ||
"gitHead": "3143ea17daa8d4364835fa7e5f4890f1ee838648" | ||
} |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2085
144099