tswatch/test/test.ts

21 lines
569 B
TypeScript
Raw Permalink Normal View History

2019-05-09 00:08:40 +02:00
// tslint:disable-next-line: no-implicit-dependencies
2023-08-26 14:52:12 +02:00
import { expect, expectAsync, tap } from '@push.rocks/tapbundle';
2022-03-14 21:17:36 +01:00
import * as tswatch from '../ts/index.js';
2018-10-28 02:48:43 +02:00
let testTsWatchInstance: tswatch.TsWatch;
tap.test('should create a valid TsWatch instance', async () => {
2019-05-09 00:08:40 +02:00
testTsWatchInstance = new tswatch.TsWatch('echoSomething');
2018-10-28 02:48:43 +02:00
});
tap.test('should start the tswatch instance', async () => {
2019-05-09 00:08:40 +02:00
await testTsWatchInstance.start();
2018-10-28 02:48:43 +02:00
});
2020-07-04 10:45:56 +00:00
tap.test('should stop the instance', async (tools) => {
2019-05-09 00:08:40 +02:00
tools.delayFor(2000);
testTsWatchInstance.stop();
});
2018-10-28 02:48:43 +02:00
tap.start();