UNPKG

automation-extra-plugin

Version:

Base class for automation-extra plugins (supports Playwright and Puppeteer).

21 lines 668 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const ava_1 = require("ava"); const _1 = require("../."); ava_1.default('should have the public class members', async (t) => { const pluginName = 'hello-world'; class Plugin extends _1.AutomationExtraPlugin { constructor(opts = {}) { super(opts); } async onPageCreated(page) { await this.shim(page).addScript((x) => { console.log(x); }, 'bar'); } } Plugin.id = pluginName; const instance = new Plugin(); t.true(instance.shim instanceof Function); }); //# sourceMappingURL=shim.js.map