2019-09-17 12:45:15 +00:00
|
|
|
import { expect } from 'chai';
|
|
|
|
import { spy } from 'sinon';
|
|
|
|
|
2019-09-29 15:03:26 +00:00
|
|
|
import { main } from '../src/app';
|
2019-09-17 12:45:15 +00:00
|
|
|
|
2020-06-30 13:14:30 +00:00
|
|
|
describe('app', async () => {
|
|
|
|
it('should log a message', async () => {
|
2019-09-17 12:47:12 +00:00
|
|
|
/* tslint:disable-next-line:no-console no-unbound-method */
|
|
|
|
const logSpy = spy(console, 'log');
|
2019-09-17 12:45:15 +00:00
|
|
|
|
2019-09-29 15:03:26 +00:00
|
|
|
await main([]);
|
2019-09-17 12:45:15 +00:00
|
|
|
|
|
|
|
expect(logSpy).to.have.callCount(1);
|
|
|
|
});
|
|
|
|
});
|