Fix jwt-token
This commit is contained in:
@@ -88,6 +88,9 @@ async function setupTestEnvironment() {
|
||||
ManagementUser
|
||||
};
|
||||
|
||||
// Store models globally for routes to access
|
||||
global.__TEST_MODELS__ = models;
|
||||
|
||||
// Sync database
|
||||
await sequelize.sync({ force: true });
|
||||
|
||||
@@ -102,6 +105,8 @@ async function teardownTestEnvironment() {
|
||||
if (sequelize) {
|
||||
await sequelize.close();
|
||||
}
|
||||
// Clear global models
|
||||
delete global.__TEST_MODELS__;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user