fix(core): update

This commit is contained in:
2024-03-01 00:26:06 +01:00
parent b003da7f59
commit 8a9c2c1505
5 changed files with 28 additions and 21 deletions

View File

@ -30,14 +30,14 @@ tap.test('should define a testHandler', async () => {
});
tap.test('should fire a request', async () => {
const typedRequest = new typedrequest.TypedRequest<ITestReqRes>(
'http://localhost:3000/typedrequest',
'hi'
);
const result = await typedRequest.fire({
name: 'yes',
let response = await fetch('http://localhost:3000/typedrequest', {
"method": "POST",
"headers": {
"Content-Type": "application/json"
},
"body": "{\"correlation\":{\"id\":\"uni_aefe56c1a0f61a3e91082209\",\"phase\":\"request\"},\"method\":\"hi\",\"request\":{\"name\":\"yes\"},\"response\":null}"
})
console.log(result);
console.log(await response.text());
});
tap.test('test', async (tools) => {