UNPKG

@storybook/test-runner

Version:
21 lines (15 loc) 477 B
const { setupPage } = require('../dist'); const PlaywrightEnvironment = require('jest-playwright-preset/lib/PlaywrightEnvironment').default; class CustomEnvironment extends PlaywrightEnvironment { async setup() { await super.setup(); await setupPage(this.global.page, this.global.context); } async teardown() { await super.teardown(); } async handleTestEvent(event) { await super.handleTestEvent(event); } } module.exports = CustomEnvironment;