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