UNPKG

playwright-test

Version:

Run mocha, zora, uvu, tape and benchmark.js scripts inside real browsers with playwright.

30 lines (25 loc) 486 B
class PwTestController { constructor() { this.beforeEnded = false this.ended = false this.failed = false this.env = {} this.endCalled = false } beforeEnd() { this.beforeEnded = true } end(failed = this.failed) { if (this.endCalled) { return } this.ended = true this.failed = failed this.endCalled = true } fail() { this.failed = true } } globalThis.PW_TEST = new PwTestController() console.log('Setup complete')