feat: Use vitest instead of jest for ESM compatibility

This commit is contained in:
Faruk AYDIN
2024-01-12 14:07:59 +01:00
parent 911159a14f
commit af9ceac0b4
19 changed files with 655 additions and 66 deletions

View File

@@ -0,0 +1,12 @@
import path from 'path';
import fs from 'fs';
import { fileURLToPath } from 'url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const testEnvFile = path.resolve(__dirname, '../../.env.test');
if (!fs.existsSync(testEnvFile)) {
throw new Error(
'Test environment file (.env.test) not found! You can copy .env-example.test to .env.test and fill it with your own values.'
);
}