|
@@ -26,16 +26,17 @@ describe('@jupyterlab/coreutils', () => {
|
|
|
});
|
|
|
|
|
|
it('should handle query and hash', () => {
|
|
|
- let obj = URLExt.parse('http://x.com/path?that\'s#all, folks');
|
|
|
+ let url = 'http://example.com/path?that\'s#all, folks';
|
|
|
+ let obj = URLExt.parse(url);
|
|
|
try {
|
|
|
- expect(obj.href).to.equal('http://x.com/path?that%27s#all,%20folks');
|
|
|
+ expect(obj.href).to.equal(url.replace(' ', '%20'));
|
|
|
} catch (e) {
|
|
|
// Chrome
|
|
|
- expect(obj.href).to.equal('http://x.com/path?that%27s#all, folks');
|
|
|
+ expect(obj.href).to.equal(url);
|
|
|
}
|
|
|
expect(obj.protocol).to.equal('http:');
|
|
|
- expect(obj.host).to.equal('x.com');
|
|
|
- expect(obj.hostname).to.equal('x.com');
|
|
|
+ expect(obj.host).to.equal('example.com');
|
|
|
+ expect(obj.hostname).to.equal('example.com');
|
|
|
expect(obj.search).to.equal('?that%27s');
|
|
|
expect(obj.pathname).to.equal('/path');
|
|
|
try {
|