(url, result)
| 86 | const currentPort = location.port; |
| 87 | |
| 88 | function compareParse(url, result) { |
| 89 | // Using JSON string comparison because Chai's deeply equal |
| 90 | // errors are impossible to debug. |
| 91 | const parsed = JSON.stringify(parseUrlDeprecated(url)); |
| 92 | const expected = JSON.stringify(result); |
| 93 | expect(parsed).to.equal(expected); |
| 94 | } |
| 95 | |
| 96 | it('should parse correctly', () => { |
| 97 | compareParse('https://foo.com/abc?123#foo', { |
no test coverage detected