diff --git a/package.json b/package.json index a945899..a7aa969 100644 --- a/package.json +++ b/package.json @@ -23,21 +23,21 @@ "validate": "npm run style && npm run test" }, "devDependencies": { - "babel-cli": "^6.8.0", - "babel-eslint": "^6.0.4", + "babel-cli": "^6.10.1", + "babel-eslint": "^6.1.0", "babel-plugin-flow-comments": "^6.3.19", - "babel-plugin-rewire": "^1.0.0-rc-3", + "babel-plugin-rewire": "^1.0.0-rc-4", "babel-plugin-transform-builtin-extend": "^1.1.0", - "babel-preset-es2015": "^6.6.0", + "babel-preset-es2015": "^6.9.0", "babel-preset-stage-0": "^6.5.0", - "eslint": "^2.10.1", + "eslint": "^3.0.0", "eslint-config-poosh": "^1.0.0", - "eslint-plugin-babel": "^3.2.0", + "eslint-plugin-babel": "^3.3.0", "eslint-plugin-flow-vars": "^0.4.0", "istanbul": "^1.0.0-alpha.2", - "lerna": "^1.1.2", - "mocha": "^2.4.5", - "should": "^8.3.1", + "lerna": "^1.1.3", + "mocha": "^2.5.3", + "should": "^9.0.2", "sinon": "^1.17.4" } } diff --git a/packages/poosh-common/test/url/looseParse.js b/packages/poosh-common/test/url/looseParse.js index dc80e53..b3452e3 100644 --- a/packages/poosh-common/test/url/looseParse.js +++ b/packages/poosh-common/test/url/looseParse.js @@ -1,57 +1,25 @@ +import url from "url"; import should from "should"; import looseParse from "../../lib/url/looseParse"; describe("looseParse", function () { it("Should works with protocol", () => { - looseParse("http://foo.com/bar").should.eql({ - auth: null, - hash: null, - host: "foo.com", - hostname: "foo.com", - href: "http://foo.com/bar", - path: "/bar", - pathname: "/bar", - port: null, - protocol: "http:", - query: null, - search: null, - slashes: true - }); + looseParse("http://foo.com/bar").should.eql( + url.parse("http://foo.com/bar") + ); }); it("Should works without protocol", () => { - looseParse("foo.com/bar").should.eql({ - auth: null, - hash: null, - host: "foo.com", - hostname: "foo.com", - href: "http://foo.com/bar", - path: "/bar", - pathname: "/bar", - port: null, - protocol: "http:", - query: null, - search: null, - slashes: true - }); + looseParse("foo.com/bar").should.eql( + url.parse("http://foo.com/bar") + ); }); it("Should works without protocol but with an explicit default protocol", () => { - looseParse("foo.com/bar", "https://").should.eql({ - auth: null, - hash: null, - host: "foo.com", - hostname: "foo.com", - href: "https://foo.com/bar", - path: "/bar", - pathname: "/bar", - port: null, - protocol: "https:", - query: null, - search: null, - slashes: true - }); + looseParse("foo.com/bar", "https://").should.eql( + url.parse("https://foo.com/bar") + ); }); it("Should return undefined with no values", () => {