Fix jwt-token

This commit is contained in:
2025-09-16 06:40:52 +02:00
parent 7d53623647
commit 2f275029ec
2 changed files with 13 additions and 21 deletions

View File

@@ -15,6 +15,17 @@ describe('Detectors Routes', () => {
// Setup express app for testing
app = express();
app.use(express.json());
// Add mock Socket.io middleware for tests
app.use((req, res, next) => {
req.io = {
emit: () => {}, // Mock emit function that does nothing
emitToDashboard: () => {},
emitToDevice: () => {}
};
next();
});
app.use('/detectors', detectorsRoutes);
});