fix(viewer): 🐛 Custom metadata in viewer
This commit is contained in:
14
apps/viewer/playwright/global-setup.ts
Normal file
14
apps/viewer/playwright/global-setup.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { FullConfig } from '@playwright/test'
|
||||
import { setupDatabase, teardownDatabase } from './services/database'
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
require('dotenv').config({ path: '.env' })
|
||||
|
||||
async function globalSetup(config: FullConfig) {
|
||||
const { baseURL } = config.projects[0].use
|
||||
if (!baseURL) throw new Error('baseURL is missing')
|
||||
await teardownDatabase()
|
||||
await setupDatabase()
|
||||
}
|
||||
|
||||
export default globalSetup
|
||||
Reference in New Issue
Block a user