Fix jwt-token

This commit is contained in:
2025-09-16 07:17:31 +02:00
parent 104243810d
commit c9a38acfbb
2 changed files with 7 additions and 0 deletions

View File

@@ -9,10 +9,14 @@ describe('Detectors Routes', () => {
let app, models, sequelize, detectorsRoutes;
before(async () => {
console.log('🔧 DEBUG: detectors.test.js before() - global.__TEST_MODELS__ before setupTestEnvironment:', !!global.__TEST_MODELS__);
({ models, sequelize } = await setupTestEnvironment());
console.log('🔧 DEBUG: detectors.test.js before() - global.__TEST_MODELS__ after setupTestEnvironment:', !!global.__TEST_MODELS__);
// IMPORTANT: Require routes AFTER setupTestEnvironment so they use global test models
console.log('🔧 DEBUG: About to require detectors route - global.__TEST_MODELS__:', !!global.__TEST_MODELS__);
detectorsRoutes = require('../../routes/detectors');
console.log('🔧 DEBUG: Required detectors route - global.__TEST_MODELS__:', !!global.__TEST_MODELS__);
// Setup express app for testing
app = express();