chore: sets env vars for tests in globalSetup

This commit is contained in:
James
2024-04-01 15:29:27 -04:00
parent a0f6018469
commit 4befd2e4ff
4 changed files with 20 additions and 4 deletions

View File

@@ -1,3 +1,9 @@
import path from 'path'
import { fileURLToPath } from 'url'
const filename = fileURLToPath(import.meta.url)
const dirname = path.dirname(filename)
/** @type {import('jest').Config} */
const customJestConfig = {
extensionsToTreatAsEsm: ['.ts', '.tsx'],
@@ -10,6 +16,7 @@ const customJestConfig = {
},
reporters: ['default', ['github-actions', { silent: false }], 'summary'],
testEnvironment: 'node',
globalSetup: path.resolve(dirname, 'setup.ts'),
testMatch: ['<rootDir>/**/*int.spec.ts'],
testTimeout: 90000,
transform: {