2019-06-20 12:01:51 +00:00
|
|
|
import { expect, tap } from '@pushrocks/tapbundle';
|
|
|
|
import * as smartdaemon from '../ts/index';
|
|
|
|
|
2019-09-03 13:21:30 +00:00
|
|
|
let testSmartdaemon: smartdaemon.SmartDaemon;
|
|
|
|
|
|
|
|
tap.test('should create an instance of smartdaemon', async () => {
|
|
|
|
testSmartdaemon = new smartdaemon.SmartDaemon();
|
|
|
|
expect(testSmartdaemon).to.be.instanceOf(smartdaemon.SmartDaemon);
|
2019-06-20 12:01:51 +00:00
|
|
|
});
|
|
|
|
|
2019-09-03 20:09:30 +00:00
|
|
|
tap.test('should create a service', async () => {
|
|
|
|
testSmartdaemon.addService({
|
|
|
|
command: 'npm -v',
|
|
|
|
description: 'displays the npm version',
|
|
|
|
name: 'npmversion',
|
|
|
|
workingDir: __dirname
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2019-06-20 12:01:51 +00:00
|
|
|
tap.start();
|