1
1
mirror of https://github.com/leon-ai/leon.git synced 2024-12-19 23:01:31 +03:00
leon/packages/checker/test/haveibeenpwned.spec.js
2021-12-27 18:37:42 +08:00

12 lines
385 B
JavaScript

describe('checker:haveibeenpwned', () => {
test('checks if an email address has been provided', async () => {
global.nlu.brain.execute = jest.fn()
await global.nlu.process('Have I been pwned?')
const [obj] = global.nlu.brain.execute.mock.calls
await global.brain.execute(obj[0])
expect(global.brain.finalOutput.codes).toIncludeSameMembers(['no-email'])
})
})