Fix jwt-token
This commit is contained in:
@@ -83,6 +83,10 @@ async function setupTestEnvironment() {
|
||||
id: mainModelsPath
|
||||
};
|
||||
|
||||
// Clear cache for middleware modules so they re-import the overridden models
|
||||
const authMiddlewarePath = path.resolve(__dirname, '../middleware/auth.js');
|
||||
delete require.cache[authMiddlewarePath];
|
||||
|
||||
// Sync database
|
||||
await sequelize.sync({ force: true });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user