You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
434 B
19 lines
434 B
5 years ago
|
import 'mocha';
|
||
|
import { expect } from 'chai';
|
||
|
import { IMAPAuth } from '../../src/auth/IMAPAuth';
|
||
|
|
||
|
describe('test imap auth', () => {
|
||
|
it('authenticate against imap server', async () => {
|
||
|
const auth = new IMAPAuth({
|
||
|
host: 'imap.gmail.com',
|
||
|
port: 993,
|
||
|
useSecureTransport: true,
|
||
|
validHosts: ['gmail.com']
|
||
|
});
|
||
|
|
||
|
const result = await auth.authenticate('username', 'password');
|
||
|
|
||
|
expect(result).to.equal(true);
|
||
|
});
|
||
|
});
|