fix(core): update

This commit is contained in:
2020-07-26 13:48:57 +00:00
parent 53a4375545
commit df87c6c75e
4 changed files with 10 additions and 9 deletions

View File

@ -33,12 +33,11 @@ tap.test('should spawn a server to test with', async () => {
});
tap.test('should define a testHandler', async () => {
const testTypedRouter = new typedrequest.TypedRouter();
testTypedRouter.addTypedHandler(testTypedHandler);
testServer.addRoute(
'/testroute',
new smartexpress.Handler('POST', async (req, res) => {
console.log(req.body);
res.json(await testTypedHandler.addResponse(req.body));
})
new smartexpress.HandlerTypedRouter(testTypedRouter as any)
);
});