diff options
Diffstat (limited to 'deps/npm/node_modules/npm-package-arg/test/windows.js')
-rw-r--r-- | deps/npm/node_modules/npm-package-arg/test/windows.js | 92 |
1 files changed, 49 insertions, 43 deletions
diff --git a/deps/npm/node_modules/npm-package-arg/test/windows.js b/deps/npm/node_modules/npm-package-arg/test/windows.js index b91416e2f96..a10fa5b6861 100644 --- a/deps/npm/node_modules/npm-package-arg/test/windows.js +++ b/deps/npm/node_modules/npm-package-arg/test/windows.js @@ -1,69 +1,75 @@ global.FAKE_WINDOWS = true -var npa = require("../npa.js") -var test = require("tap").test -var path = require("path") +var npa = require('../npa.js') +var test = require('tap').test var cases = { - "C:\\x\\y\\z": { - raw: "C:\\x\\y\\z", + 'C:\\x\\y\\z': { + raw: 'C:\\x\\y\\z', scope: null, name: null, - rawSpec: "C:\\x\\y\\z", - spec: "C:\\x\\y\\z", - type: "local" + escapedName: null, + rawSpec: 'C:\\x\\y\\z', + spec: 'C:\\x\\y\\z', + type: 'local' }, - "foo@C:\\x\\y\\z": { - raw: "foo@C:\\x\\y\\z", + 'foo@C:\\x\\y\\z': { + raw: 'foo@C:\\x\\y\\z', scope: null, - name: "foo", - rawSpec: "C:\\x\\y\\z", - spec: "C:\\x\\y\\z", - type: "local" + name: 'foo', + escapedName: 'foo', + rawSpec: 'C:\\x\\y\\z', + spec: 'C:\\x\\y\\z', + type: 'local' }, - "foo@file:///C:\\x\\y\\z": { - raw: "foo@file:///C:\\x\\y\\z", + 'foo@file:///C:\\x\\y\\z': { + raw: 'foo@file:///C:\\x\\y\\z', scope: null, - name: "foo", - rawSpec: "file:///C:\\x\\y\\z", - spec: "C:\\x\\y\\z", - type: "local" + name: 'foo', + escapedName: 'foo', + rawSpec: 'file:///C:\\x\\y\\z', + spec: 'C:\\x\\y\\z', + type: 'local' }, - "foo@file://C:\\x\\y\\z": { - raw: "foo@file://C:\\x\\y\\z", + 'foo@file://C:\\x\\y\\z': { + raw: 'foo@file://C:\\x\\y\\z', scope: null, - name: "foo", - rawSpec: "file://C:\\x\\y\\z", - spec: "C:\\x\\y\\z", - type: "local" + name: 'foo', + escapedName: 'foo', + rawSpec: 'file://C:\\x\\y\\z', + spec: 'C:\\x\\y\\z', + type: 'local' }, - "file:///C:\\x\\y\\z": { - raw: "file:///C:\\x\\y\\z", + 'file:///C:\\x\\y\\z': { + raw: 'file:///C:\\x\\y\\z', scope: null, name: null, - rawSpec: "file:///C:\\x\\y\\z", - spec: "C:\\x\\y\\z", - type: "local" + escapedName: null, + rawSpec: 'file:///C:\\x\\y\\z', + spec: 'C:\\x\\y\\z', + type: 'local' }, - "file://C:\\x\\y\\z": { - raw: "file://C:\\x\\y\\z", + 'file://C:\\x\\y\\z': { + raw: 'file://C:\\x\\y\\z', scope: null, name: null, - rawSpec: "file://C:\\x\\y\\z", - spec: "C:\\x\\y\\z", - type: "local" + escapedName: null, + rawSpec: 'file://C:\\x\\y\\z', + spec: 'C:\\x\\y\\z', + type: 'local' }, - "foo@/foo/bar/baz": { - raw: "foo@/foo/bar/baz", + 'foo@/foo/bar/baz': { + raw: 'foo@/foo/bar/baz', scope: null, - name: "foo", - rawSpec: "/foo/bar/baz", - spec: "/foo/bar/baz", - type: "local" + name: 'foo', + escapedName: 'foo', + rawSpec: '/foo/bar/baz', + spec: '/foo/bar/baz', + type: 'local' } } -test("parse a windows path", function (t) { +test('parse a windows path', function (t) { Object.keys(cases).forEach(function (c) { var expect = cases[c] var actual = npa(c) |