21 lines
595 B
TypeScript
21 lines
595 B
TypeScript
import { expect, tap } from '@pushrocks/tapbundle';
|
|
import * as deesComms from '../ts/index.js';
|
|
|
|
let deesCommsTest: deesComms.DeesComms;
|
|
|
|
tap.test('first test', async (tools) => {
|
|
deesCommsTest = new deesComms.DeesComms();
|
|
deesCommsTest.createTypedHandler<any>('test', async (requestData) => {
|
|
return { hitheretoo: `greetings to ${requestData.hithere}` };
|
|
});
|
|
|
|
// lets fire a request
|
|
const typedrequest = deesCommsTest.createTypedRequest<any>('test');
|
|
const result = await typedrequest.fire({
|
|
hithere: 'hello',
|
|
});
|
|
console.log(JSON.stringify(result));
|
|
});
|
|
|
|
tap.start();
|