Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion test/unit/frontend/services/mqtt.service.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,8 @@ describe('MqttService', async () => {
const second = createMqttService({ app: { a: 2 }, services: {}, router: {} })
expect(first).toBe(second)

const fresh = new first.constructor({ app: {}, services: {}, router: {} })
const Ctor = first.constructor
const fresh = new Ctor({ app: {}, services: {}, router: {} })
expect(fresh.$services).toEqual({})
await expect(fresh.createClient('missing-options', { getCredentials: async () => ({ url: 'mqtt://example.com', username: '', password: 'pass' }) })).rejects.toThrow('MQTT credential provider for connection "missing-options" must return a non-empty username')
await expect(fresh.publishMessage('missing-key', { topic: 'a', payload: 'x' })).rejects.toThrow('MQTT connection "missing-key" does not exist')
Expand Down
Loading