Skip to content

Commit

Permalink
test: Add dynamic route support to router
Browse files Browse the repository at this point in the history
  • Loading branch information
AxiosLeo committed Feb 27, 2024
1 parent 699dfcd commit 22cb494
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/routes.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ describe('router test case', () => {

const moduleRouters = new Router('/module');
router.add(moduleRouters);
router.add('/{:module}', moduleRouters);

const routes = resolveRouters([router]);
const routes = resolveRouters(router);
const result = getRouteInfo(routes, '/api/v1/module/123');
expect(result).not.to.be.null;
});
Expand Down

0 comments on commit 22cb494

Please sign in to comment.