From eb6c4cc575eff7907a4ff1a65d17d9b032d017f4 Mon Sep 17 00:00:00 2001 From: Nathan Curtis Date: Wed, 20 Nov 2024 11:08:28 -0800 Subject: [PATCH] [TM-1452] Rethrow the error to halt test execution. --- jest/setup-jest-global.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jest/setup-jest-global.ts b/jest/setup-jest-global.ts index 3f29fe5..7c37201 100644 --- a/jest/setup-jest-global.ts +++ b/jest/setup-jest-global.ts @@ -1,7 +1,7 @@ -const { Sequelize } = require("sequelize-typescript"); -const Entities = require("../libs/database/src/lib/entities"); +import * as Entities from "../libs/database/src/lib/entities"; +import { Sequelize } from "sequelize-typescript"; -module.exports = async () => { +export default async () => { // To create this database, run the ./setup-test-database.sh script. const sequelize = new Sequelize({ dialect: "mariadb", @@ -18,6 +18,7 @@ module.exports = async () => { await sequelize.sync(); } catch (e) { console.error("Error synchronizing database", e); + throw e; } await sequelize.close(); };