diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-09 15:09:29 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-09 15:09:29 +0000 |
commit | 209bd8cf1f542f6ba2a069b368a9187faa871e96 (patch) | |
tree | 6b77dc8183135b8316cc70c8dbc9c4e7c18cf05a /spec/frontend/repository | |
parent | a9ced7da447785c57477b3d8dbccc73a78cface1 (diff) | |
download | gitlab-ce-209bd8cf1f542f6ba2a069b368a9187faa871e96.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/repository')
-rw-r--r-- | spec/frontend/repository/router_spec.js | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/spec/frontend/repository/router_spec.js b/spec/frontend/repository/router_spec.js index 8f3ac53c37a..6944b23558a 100644 --- a/spec/frontend/repository/router_spec.js +++ b/spec/frontend/repository/router_spec.js @@ -4,14 +4,15 @@ import createRouter from '~/repository/router'; describe('Repository router spec', () => { it.each` - path | component | componentName - ${'/'} | ${IndexPage} | ${'IndexPage'} - ${'/tree/master'} | ${TreePage} | ${'TreePage'} - ${'/-/tree/master'} | ${TreePage} | ${'TreePage'} - ${'/-/tree/master/app/assets'} | ${TreePage} | ${'TreePage'} - ${'/-/tree/123/app/assets'} | ${null} | ${'null'} - `('sets component as $componentName for path "$path"', ({ path, component }) => { - const router = createRouter('', 'master'); + path | branch | component | componentName + ${'/'} | ${'master'} | ${IndexPage} | ${'IndexPage'} + ${'/tree/master'} | ${'master'} | ${TreePage} | ${'TreePage'} + ${'/-/tree/master'} | ${'master'} | ${TreePage} | ${'TreePage'} + ${'/-/tree/master/app/assets'} | ${'master'} | ${TreePage} | ${'TreePage'} + ${'/-/tree/feature/test-%23/app/assets'} | ${'feature/test-#'} | ${TreePage} | ${'TreePage'} + ${'/-/tree/123/app/assets'} | ${'master'} | ${null} | ${'null'} + `('sets component as $componentName for path "$path"', ({ path, component, branch }) => { + const router = createRouter('', branch); const componentsForRoute = router.getMatchedComponents(path); |