Fix jwt-token
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user