Skip to content

Commit

Permalink
Configure tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mchudy committed Sep 14, 2020
1 parent 0fd2d4b commit 7701445
Show file tree
Hide file tree
Showing 7 changed files with 4,882 additions and 251 deletions.
20 changes: 20 additions & 0 deletions __tests__/routing.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { createRouting, segment, number } from 'index';

describe('routing', () => {
it('should create routing', () => {
const routes = createRouting({
company: segment`/companies/${number('companyId')}`,
contact: segment`/contacts/${number('contactId')}`,
insight: segment`/insight/${number('insightId')}`,
admin: {
...segment`/admin`,
children: {
users: segment`/users`,
},
},
onetime: segment`/onetime`,
} as const);

routes.company({ companyId: '20' });
});
});
5 changes: 5 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
moduleDirectories: ['node_modules', 'src'],
};
Loading

0 comments on commit 7701445

Please sign in to comment.