@storybook/test-runner
Version:
Test runner for Storybook stories
21 lines (15 loc) • 477 B
JavaScript
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;