Ejemplo n.º 1
0
 it('url is escaped', () => {
   // IE11 will return a relative pathname while other browsers will return a full pathname.
   // parseUrl uses an anchor element for parsing an url. With relative urls, the anchor
   // element will create an absolute url relative to the current execution context.
   // The JavaScript test suite is executed at '/' which will lead to an absolute url
   // starting with '/'.
   expect(commonUtils.parseUrl('" test="asf"').pathname).toContain('/%22%20test=%22asf%22');
 });
Ejemplo n.º 2
0
 it('returns an anchor tag with url', () => {
   expect(commonUtils.parseUrl('/some/absolute/url').pathname).toContain('some/absolute/url');
 });