MCPcopy
hub / github.com/ampproject/amphtml / compareParse

Function compareParse

test/unit/test-url.js:88–94  ·  view source on GitHub ↗
(url, result)

Source from the content-addressed store, hash-verified

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', {

Callers 1

test-url.jsFile · 0.85

Calls 3

parseUrlDeprecatedFunction · 0.90
expectFunction · 0.85
stringifyMethod · 0.80

Tested by

no test coverage detected