(actual: UrlTree, expectedUrl: string)
| 1916 | } |
| 1917 | |
| 1918 | function expectTreeToBe(actual: UrlTree, expectedUrl: string): void { |
| 1919 | const expected = createUrlTree(expectedUrl); |
| 1920 | const serializer = new DefaultUrlSerializer(); |
| 1921 | const error = `"${serializer.serialize(actual)}" is not equal to "${serializer.serialize( |
| 1922 | expected, |
| 1923 | )}"`; |
| 1924 | compareSegments(actual.root, expected.root, error); |
| 1925 | expect(actual.queryParams).toEqual(expected.queryParams); |
| 1926 | expect(actual.fragment).toEqual(expected.fragment); |
| 1927 | } |
| 1928 | |
| 1929 | function compareSegments(actual: UrlSegmentGroup, expected: UrlSegmentGroup, error: string): void { |
| 1930 | expect(actual).toBeDefined(error); |
no test coverage detected
searching dependent graphs…