Skip to content

Commit

Permalink
feat(browser-router): support array parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
MrWolfZ committed Dec 30, 2020
1 parent f447414 commit 6564a7a
Show file tree
Hide file tree
Showing 7 changed files with 485 additions and 51 deletions.
8 changes: 8 additions & 0 deletions packages/browser-router/e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,26 +163,34 @@ describe(`@simplux/browser-router`, () => {
stringParam: 'a',
numberParam: 1,
booleanParam: false,
arrayStringParam: ['b', 'c', 'long'],
arrayNumberParam: [100, -100, 9999999999],
})

expect(routeWithPathParameters.isActive()).toBe(true)
expect(routeWithPathParameters.parameterValues()).toEqual({
stringParam: 'a',
numberParam: 1,
booleanParam: false,
arrayStringParam: ['b', 'c', 'long'],
arrayNumberParam: [100, -100, 9999999999],
})

await routeWithQueryParameters.navigateTo({
stringParam: 'a',
numberParam: 1,
booleanParam: false,
arrayStringParam: ['b', 'c', 'long'],
arrayNumberParam: [100, -100, 9999999999],
})

expect(routeWithQueryParameters.isActive()).toBe(true)
expect(routeWithQueryParameters.parameterValues()).toEqual({
stringParam: 'a',
numberParam: 1,
booleanParam: false,
arrayStringParam: ['b', 'c', 'long'],
arrayNumberParam: [100, -100, 9999999999],
})

await routeWithOptionalQueryParameter.navigateTo({
Expand Down
Loading

0 comments on commit 6564a7a

Please sign in to comment.