tswatch/test/test.ts

21 lines
550 B
TypeScript
Raw Normal View History

2019-05-08 22:08:40 +00:00
// tslint:disable-next-line: no-implicit-dependencies
2018-10-28 00:48:43 +00:00
import { expect, tap } from '@pushrocks/tapbundle';
import * as tswatch from '../ts/index';
let testTsWatchInstance: tswatch.TsWatch;
tap.test('should create a valid TsWatch instance', async () => {
2019-05-08 22:08:40 +00:00
testTsWatchInstance = new tswatch.TsWatch('echoSomething');
2018-10-28 00:48:43 +00:00
});
tap.test('should start the tswatch instance', async () => {
2019-05-08 22:08:40 +00:00
await testTsWatchInstance.start();
2018-10-28 00:48:43 +00:00
});
2019-10-12 13:07:44 +00:00
tap.test('should stop the instance', async tools => {
2019-05-08 22:08:40 +00:00
tools.delayFor(2000);
testTsWatchInstance.stop();
});
2018-10-28 00:48:43 +00:00
tap.start();