smartipc/test/test.ts

28 lines
679 B
TypeScript
Raw Normal View History

2019-04-05 18:30:43 +00:00
import { expect, tap } from '@pushrocks/tapbundle';
2019-04-08 17:42:23 +00:00
import * as smartipc from '../ts/index';
2019-04-05 18:30:43 +00:00
2019-04-08 17:42:23 +00:00
import * as smartspawn from '@pushrocks/smartspawn';
import * as smartpromise from '@pushrocks/smartpromise';
let testIpc: smartipc.SmartIpc;
tap.test('should instantiate a valid instance', async () => {
testIpc = new smartipc.SmartIpc({
ipcSpace: 'testSmartIpc',
type: 'server'
});
2019-04-08 17:56:21 +00:00
testIpc.start();
2019-04-08 17:42:23 +00:00
});
2019-04-08 17:56:21 +00:00
tap.test('should create a client', async tools => {
const clientIpc = new smartipc.SmartIpc({
ipcSpace: 'testSmartIpc',
type: 'client'
});
clientIpc.sendMessage();
2019-04-08 17:42:23 +00:00
});
2019-04-08 17:56:21 +00:00
tap.test('should terminate the smartipc process', async () => {});
2019-04-08 17:42:23 +00:00
tap.start();