23 lines
565 B
TypeScript
23 lines
565 B
TypeScript
import { expect, tap } from '@pushrocks/tapbundle';
|
|
import * as deesComms from '../ts/index';
|
|
|
|
let deesCommsTest: deesComms.DeesComms;
|
|
|
|
tap.test('first test', async (tools) => {
|
|
deesCommsTest = new deesComms.DeesComms();
|
|
deesCommsTest.createTypedHandler<any>('test', async (requestData) => {
|
|
return {};
|
|
});
|
|
|
|
// lets fire a request
|
|
const typedrequest = deesCommsTest.createTypedRequest<any>('test');
|
|
const resultPromise = typedrequest.fire({
|
|
method: 'test',
|
|
request: {},
|
|
response: {}
|
|
});
|
|
await tools.delayFor(2000);
|
|
});
|
|
|
|
tap.start();
|