Skip to content

Commit

Permalink
Merge pull request #525 from mtsknn/router-test
Browse files Browse the repository at this point in the history
Add missing test for router
  • Loading branch information
jayehernandez authored Nov 1, 2020
2 parents f41624a + 8f192e8 commit 6599863
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions client/test/src/router/index.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import App from '../../../src/App';
import router from '../../../src/router/index';

describe('router', () => {
Expand All @@ -13,4 +14,11 @@ describe('router', () => {
it('has the name for the route', () => {
expect(router.options.routes[0].name).toEqual('Home');
});
it('uses `App` component for the route', async () => {
let component = await router.options.routes[0].component();
component = component.default; // default export

expect(component.name).toEqual('App');
expect(component).toEqual(App);
});
});

0 comments on commit 6599863

Please sign in to comment.