fix(core): update
This commit is contained in:
15
test/test.ts
15
test/test.ts
@ -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();
|
||||
|
Reference in New Issue
Block a user