Revert "fix(router): make routerLinkActive work with query params which contain arrays (#22666)" (#33861)

This reverts commit b30bb8dd91.

Reason: breaks internal g3 project.

PR Close #33861
This commit is contained in:
Alex Rickabaugh
2019-11-15 12:45:37 -08:00
parent c182dea146
commit 3074cdfea9
4 changed files with 6 additions and 48 deletions

View File

@ -41,24 +41,6 @@ describe('UrlTree', () => {
expect(containsTree(t1, t2, true)).toBe(true);
});
it('should return true when queryParams are the same but with diffrent order', () => {
const t1 = serializer.parse('/one/two?test=1&page=5');
const t2 = serializer.parse('/one/two?page=5&test=1');
expect(containsTree(t1, t2, true)).toBe(true);
});
it('should return true when queryParams contains array params that are the same', () => {
const t1 = serializer.parse('/one/two?test=a&test=b&pages=5&pages=6');
const t2 = serializer.parse('/one/two?test=a&test=b&pages=5&pages=6');
expect(containsTree(t1, t2, true)).toBe(true);
});
it('should return false when queryParams contains array params but are not the same', () => {
const t1 = serializer.parse('/one/two?test=a&test=b&pages=5&pages=6');
const t2 = serializer.parse('/one/two?test=a&test=b&pages=5&pages=7');
expect(containsTree(t1, t2, false)).toBe(false);
});
it('should return false when queryParams are not the same', () => {
const t1 = serializer.parse('/one/two?test=1&page=5');
const t2 = serializer.parse('/one/two?test=1');
@ -151,18 +133,6 @@ describe('UrlTree', () => {
expect(containsTree(t1, t2, false)).toBe(false);
});
it('should return true when container has array params but containee does not have', () => {
const t1 = serializer.parse('/one/two?test=a&test=b&pages=5&pages=6');
const t2 = serializer.parse('/one/two?test=a&test=b');
expect(containsTree(t1, t2, false)).toBe(true);
});
it('should return false when containee has array params but container does not have', () => {
const t1 = serializer.parse('/one/two?test=a&test=b');
const t2 = serializer.parse('/one/two?test=a&test=b&pages=5&pages=6');
expect(containsTree(t1, t2, false)).toBe(false);
});
it('should return false when containee has different queryParams', () => {
const t1 = serializer.parse('/one/two?page=5');
const t2 = serializer.parse('/one/two?test=1');