import type { Config } from '@jest/types' ; const opts = { headless : ! ! process . env . CI || ! ! process . env . PLAYWRIGHT_HEADLESS , collectCoverage : ! ! process . env . PLAYWRIGHT_HEADLESS , executablePath : process . env . PLAYWRIGHT_CHROME_EXECUTABLE_PATH , } ; const config = { verbose : true , preset : 'jest-playwright-preset' , transform : { '^.+\\.ts$' : 'ts-jest' , } , testMatch : [ '<rootDir>/playwright/**/*(*.)@(spec|test).[jt]s?(x)' ] , testEnvironmentOptions : { 'jest-playwright' : { browsers : [ 'chromium' ] , exitOnPageError : false , launchType : 'LAUNCH' , launchOptions : { headless : opts . headless , executablePath : opts . executablePath , } , contextOptions : { recordVideo : { dir : 'playwright/videos' , } , } , collectCoverage : opts . collectCoverage , } , } , } ; export default config ;