fix(core): update

This commit is contained in:
2019-05-09 00:08:40 +02:00
parent 1960b1d125
commit 390200ad2a
11 changed files with 184 additions and 97 deletions

View File

@ -1,21 +1,20 @@
// tslint:disable-next-line: no-implicit-dependencies
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 () => {
testTsWatchInstance = new tswatch.TsWatch({
filePathToWatch: process.cwd(),
commandToExecute: 'npm -v',
timeout: 1000
});
testTsWatchInstance = new tswatch.TsWatch('echoSomething');
});
tap.test('should start the tswatch instance', async () => {
testTsWatchInstance.start();
console.log('test executed');
await testTsWatchInstance.start();
});
tap.test('should run abitrary commands', async () => {});
tap.test('should stop the instance', async (tools) => {
tools.delayFor(2000);
testTsWatchInstance.stop();
});
tap.start();