Skip to content

Commit

Permalink
Add additional test for createRouting
Browse files Browse the repository at this point in the history
  • Loading branch information
mchudy committed Sep 16, 2020
1 parent c990522 commit 0b36f75
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions __tests__/types/index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ const routes = createRouting({
order: segment`/orders/${number("orderId", true)}`,
} as const);

// Should not allow creating routing from raw strings
expectError(createRouting({ login: "/login" }));

// Passes without arguments when there are no required parameters or query parameters
expectType<string>(routes.login());

Expand Down

0 comments on commit 0b36f75

Please sign in to comment.