Browse Source

clean up url parse test

Steven Silvester 8 years ago
parent
commit
8de9336c2e
1 changed files with 6 additions and 5 deletions
  1. 6 5
      test/src/coreutils/url.spec.ts

+ 6 - 5
test/src/coreutils/url.spec.ts

@@ -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 {