Skip to content

Commit

Permalink
[TM-1452] Rethrow the error to halt test execution.
Browse files Browse the repository at this point in the history
  • Loading branch information
roguenet committed Nov 20, 2024
1 parent b5b85de commit eb6c4cc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions jest/setup-jest-global.ts
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -18,6 +18,7 @@ module.exports = async () => {
await sequelize.sync();
} catch (e) {
console.error("Error synchronizing database", e);
throw e;
}
await sequelize.close();
};

0 comments on commit eb6c4cc

Please sign in to comment.