"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.mochaHooks = void 0;
const tslib_1 = require("tslib");
const dotenv = require("dotenv");
const path = require("path");
exports.mochaHooks = {
    // This file is needed to end the test suite.
    beforeAll: [
        function () {
            return tslib_1.__awaiter(this, void 0, void 0, function* () {
                // Load .env file
                const envFound = dotenv.config({ path: path.resolve(__dirname, './.env') });
                // check if .env exists
                if (!envFound) {
                    console.log('     .env NOT FOUND     ');
                    process.exit(1);
                }
                else {
                    // Check environment setup first
                    console.log('     Verifying ENV     ');
                    const EnvVerifierLoader = (yield require('./loaders/envVerifier')).default;
                    yield EnvVerifierLoader();
                    console.log('     ENV Verified / Generated and Loaded!     ');
                }
            });
        },
    ],
    afterAll(done) {
        done();
        console.log('     ALL TEST CASES EXECUTED     ');
        process.exit(0);
    },
};
//# sourceMappingURL=root.js.map