playwright/tests/components/ct-svelte-vite/playwright/index.ts

15 lines
361 B
TypeScript
Raw Normal View History

import '../src/assets/index.css';
import { beforeMount, afterMount } from '@playwright/experimental-ct-svelte/hooks';
2022-10-18 22:04:54 +02:00
export type HooksConfig = {
route: string;
}
beforeMount<HooksConfig>(async ({ hooksConfig }) => {
console.log(`Before mount: ${JSON.stringify(hooksConfig)}`);
});
2022-10-18 22:04:54 +02:00
afterMount<HooksConfig>(async () => {
console.log(`After mount`);
});