feat: Add env file existince check for test suite

This commit is contained in:
Faruk AYDIN
2023-09-14 12:25:09 +02:00
parent 224965b91e
commit 2661e7102f
4 changed files with 29 additions and 1 deletions

View File

@@ -0,0 +1,10 @@
import path from 'path';
import fs from 'fs';
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.'
);
}