smartlog/test/test.ts

20 lines
500 B
TypeScript
Raw Normal View History

2018-06-05 18:48:14 +00:00
import { expect, tap } from 'tapbundle';
import * as smartlog from '../ts/index';
2018-01-28 03:31:06 +00:00
let defaultLogger: smartlog.Smartlog;
2018-06-05 18:48:14 +00:00
tap.test('should produce instance of Smartlog', async () => {
2018-01-28 03:31:06 +00:00
defaultLogger = smartlog.getDefaultLogger();
expect(defaultLogger).to.be.instanceOf(smartlog.Smartlog);
});
2018-06-05 18:48:14 +00:00
tap.test('should enable console logging', async () => {
2018-01-28 03:31:06 +00:00
defaultLogger.enableConsole();
});
2018-06-05 18:48:14 +00:00
tap.test('should be able to log things', async () => {
defaultLogger.log('silly', 'hi');
2018-01-28 03:31:06 +00:00
});
tap.start();