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 8ef6f55
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 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();
// await sequelize.close();
};
2 changes: 1 addition & 1 deletion jest/setup-jest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ beforeAll(async () => {
});

afterAll(async () => {
await sequelize.close();
// await sequelize.close();
});

0 comments on commit 8ef6f55

Please sign in to comment.