Fix jwt-token
This commit is contained in:
@@ -448,7 +448,10 @@ describe('AlertService', () => {
|
||||
const mockIo = {
|
||||
emit: sinon.stub(),
|
||||
emitToDashboard: sinon.stub(),
|
||||
emitToDevice: sinon.stub()
|
||||
emitToDevice: sinon.stub(),
|
||||
to: (room) => ({
|
||||
emit: sinon.stub()
|
||||
})
|
||||
};
|
||||
|
||||
const result = await alertService.processDetectionAlert(detection, mockIo);
|
||||
@@ -469,7 +472,10 @@ describe('AlertService', () => {
|
||||
const mockIo = {
|
||||
emit: sinon.stub(),
|
||||
emitToDashboard: sinon.stub(),
|
||||
emitToDevice: sinon.stub()
|
||||
emitToDevice: sinon.stub(),
|
||||
to: (room) => ({
|
||||
emit: sinon.stub()
|
||||
})
|
||||
};
|
||||
|
||||
await alertService.processDetectionAlert(detection, mockIo);
|
||||
@@ -500,7 +506,11 @@ describe('AlertService', () => {
|
||||
rssi: -45
|
||||
});
|
||||
|
||||
const mockIo = { emitToDashboard: sinon.stub(), emitToDevice: sinon.stub() };
|
||||
const mockIo = {
|
||||
emitToDashboard: sinon.stub(),
|
||||
emitToDevice: sinon.stub(),
|
||||
to: (room) => ({ emit: sinon.stub() })
|
||||
};
|
||||
|
||||
await alertService.processDetectionAlert(detection1, mockIo);
|
||||
await alertService.processDetectionAlert(detection2, mockIo);
|
||||
@@ -520,7 +530,11 @@ describe('AlertService', () => {
|
||||
threatLevel: 'high'
|
||||
});
|
||||
|
||||
const mockIo = { emitToDashboard: sinon.stub(), emitToDevice: sinon.stub() };
|
||||
const mockIo = {
|
||||
emitToDashboard: sinon.stub(),
|
||||
emitToDevice: sinon.stub(),
|
||||
to: (room) => ({ emit: sinon.stub() })
|
||||
};
|
||||
|
||||
// Simulate clearing old alerts
|
||||
await alertService.clearExpiredAlerts(mockIo);
|
||||
|
||||
Reference in New Issue
Block a user