fix(core): update

This commit is contained in:
2022-03-29 10:01:50 +02:00
parent 4c59d38971
commit 758dcd671c
5 changed files with 35 additions and 221 deletions

View File

@ -5,7 +5,9 @@ let deesCommsTest: deesComms.DeesComms;
tap.test('first test', async (tools) => {
deesCommsTest = new deesComms.DeesComms();
let counter = 1;
deesCommsTest.createTypedHandler<any>('test', async (requestData) => {
console.log(`got the request ${counter++}`);
return { hitheretoo: `greetings to ${requestData.hithere}` };
});
@ -15,6 +17,15 @@ tap.test('first test', async (tools) => {
hithere: 'hello',
});
console.log(JSON.stringify(result));
// lets fire a request
const typedrequest2 = deesCommsTest.createTypedRequest<any>('test2');
// TODO: return response after timeout
/* const result2 = await typedrequest2.fire({
hithere: 'hello',
});
console.log(JSON.stringify(result2)); */
});
tap.start();