Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 11x 11x 11x 11x 11x 11x 11x 11x 11x 11x 11x | // Configure dotenv before anything else!
const dotenvResult = require("dotenv").config();
Iif (dotenvResult.error) throw dotenvResult.error;
import { exec as thatExec } from "child_process";
import { promisify } from "util";
import sequelize, { connectToDatabase } from "./sequelize";
const exec = promisify(thatExec);
global.beforeAll(async () => await connectToDatabase());
global.afterAll(async () => {
await sequelize.close();
});
export async function setupTestData() {
await exec("bash ./setup.sh init constants data", { cwd: "../db" });
}
|