Fix jwt-token

This commit is contained in:
2025-09-16 21:53:46 +02:00
parent 372ce6e65b
commit 6ed5c99722
2 changed files with 6 additions and 2 deletions

View File

@@ -13,7 +13,8 @@ describe('Detections Routes', () => {
before(async () => {
({ models, sequelize } = await setupTestEnvironment());
// Inject models into auth middleware for testing
// Inject models globally for routes and into auth middleware for testing
global.__TEST_MODELS__ = models;
setModels(models);
// Setup express app for testing
@@ -24,6 +25,8 @@ describe('Detections Routes', () => {
});
after(async () => {
// Clean up global test models
delete global.__TEST_MODELS__;
await teardownTestEnvironment();
});