| 1 |
/* IMPORTANT |
| 2 |
* This snapshot file is auto-generated, but designed for humans. |
| 3 |
* It should be checked into source control and tracked carefully. |
| 4 |
* Re-generate by setting TAP_SNAPSHOT=1 and running tests. |
| 5 |
* Make sure to inspect the output below. Do not ignore changes! |
| 6 |
*/ |
| 7 |
'use strict' |
| 8 |
exports[`test/spec-from-lock.js TAP > completely invalid, return empty object 1`] = ` |
| 9 |
Object {} |
| 10 |
` |
| 11 |
|
| 12 |
exports[`test/spec-from-lock.js TAP > directory symlink 1`] = ` |
| 13 |
Result { |
| 14 |
"escapedName": "x", |
| 15 |
"fetchSpec": "{..}/some/path", |
| 16 |
"gitCommittish": undefined, |
| 17 |
"gitRange": undefined, |
| 18 |
"gitSubdir": undefined, |
| 19 |
"hosted": undefined, |
| 20 |
"name": "x", |
| 21 |
"raw": "x@file:../some/path", |
| 22 |
"rawSpec": "file:../some/path", |
| 23 |
"registry": undefined, |
| 24 |
"saveSpec": "file:../some/path", |
| 25 |
"scope": undefined, |
| 26 |
"type": "directory", |
| 27 |
"where": "{CWD}", |
| 28 |
} |
| 29 |
` |
| 30 |
|
| 31 |
exports[`test/spec-from-lock.js TAP > file with from, no integrity 1`] = ` |
| 32 |
Result { |
| 33 |
"escapedName": "x", |
| 34 |
"fetchSpec": "{CWD}/x-1.2.3.tgz", |
| 35 |
"gitCommittish": undefined, |
| 36 |
"gitRange": undefined, |
| 37 |
"gitSubdir": undefined, |
| 38 |
"hosted": undefined, |
| 39 |
"name": "x", |
| 40 |
"raw": "[email protected]", |
| 41 |
"rawSpec": "x-1.2.3.tgz", |
| 42 |
"registry": undefined, |
| 43 |
"saveSpec": "file:x-1.2.3.tgz", |
| 44 |
"scope": undefined, |
| 45 |
"type": "file", |
| 46 |
"where": "{CWD}", |
| 47 |
} |
| 48 |
` |
| 49 |
|
| 50 |
exports[`test/spec-from-lock.js TAP > file with resolved and from 1`] = ` |
| 51 |
Result { |
| 52 |
"escapedName": "x", |
| 53 |
"fetchSpec": "/path/to/x-1.2.3.tgz", |
| 54 |
"gitCommittish": undefined, |
| 55 |
"gitRange": undefined, |
| 56 |
"gitSubdir": undefined, |
| 57 |
"hosted": undefined, |
| 58 |
"name": "x", |
| 59 |
"raw": "x@/path/to/x-1.2.3.tgz", |
| 60 |
"rawSpec": "/path/to/x-1.2.3.tgz", |
| 61 |
"registry": undefined, |
| 62 |
"saveSpec": "file:/path/to/x-1.2.3.tgz", |
| 63 |
"scope": undefined, |
| 64 |
"type": "file", |
| 65 |
"where": "{CWD}", |
| 66 |
} |
| 67 |
` |
| 68 |
|
| 69 |
exports[`test/spec-from-lock.js TAP > file with resolved, no integrity 1`] = ` |
| 70 |
Result { |
| 71 |
"escapedName": "x", |
| 72 |
"fetchSpec": "/path/to/x-1.2.3.tgz", |
| 73 |
"gitCommittish": undefined, |
| 74 |
"gitRange": undefined, |
| 75 |
"gitSubdir": undefined, |
| 76 |
"hosted": undefined, |
| 77 |
"name": "x", |
| 78 |
"raw": "x@/path/to/x-1.2.3.tgz", |
| 79 |
"rawSpec": "/path/to/x-1.2.3.tgz", |
| 80 |
"registry": undefined, |
| 81 |
"saveSpec": "file:/path/to/x-1.2.3.tgz", |
| 82 |
"scope": undefined, |
| 83 |
"type": "file", |
| 84 |
"where": "{CWD}", |
| 85 |
} |
| 86 |
` |
| 87 |
|
| 88 |
exports[`test/spec-from-lock.js TAP > git repo with resolved value 1`] = ` |
| 89 |
Result { |
| 90 |
"escapedName": "gitthing", |
| 91 |
"fetchSpec": "ssh://[email protected]/isaacs/abbrev-js.git", |
| 92 |
"gitCommittish": "a9ee72ebc8fe3975f1b0c7aeb3a8f2a806a432eb", |
| 93 |
"gitRange": undefined, |
| 94 |
"gitSubdir": undefined, |
| 95 |
"hosted": GitHost { |
| 96 |
"auth": null, |
| 97 |
"blobpath": "blob", |
| 98 |
"browseblobtemplate": "function browseblobtemplate", |
| 99 |
"browsetemplate": "function browsetemplate", |
| 100 |
"browsetreetemplate": "function browsetreetemplate", |
| 101 |
"bugstemplate": "function bugstemplate", |
| 102 |
"committish": "a9ee72ebc8fe3975f1b0c7aeb3a8f2a806a432eb", |
| 103 |
"default": "sshurl", |
| 104 |
"docstemplate": "function docstemplate", |
| 105 |
"domain": "github.com", |
| 106 |
"editpath": "edit", |
| 107 |
"edittemplate": "function edittemplate", |
| 108 |
"extract": "function extract", |
| 109 |
"filetemplate": "function filetemplate", |
| 110 |
"gittemplate": "function gittemplate", |
| 111 |
"hashformat": "function hashformat", |
| 112 |
"httpstemplate": "function httpstemplate", |
| 113 |
"opts": Object { |
| 114 |
"noCommittish": true, |
| 115 |
"noGitPlus": true, |
| 116 |
}, |
| 117 |
"pathtemplate": "function pathtemplate", |
| 118 |
"project": "abbrev-js", |
| 119 |
"protocols": Array [ |
| 120 |
"git:", |
| 121 |
"http:", |
| 122 |
"git+ssh:", |
| 123 |
"git+https:", |
| 124 |
"ssh:", |
| 125 |
"https:", |
| 126 |
], |
| 127 |
"shortcuttemplate": "function shortcuttemplate", |
| 128 |
"sshtemplate": "function sshtemplate", |
| 129 |
"sshurltemplate": "function sshurltemplate", |
| 130 |
"tarballtemplate": "function tarballtemplate", |
| 131 |
"treepath": "tree", |
| 132 |
"type": "github", |
| 133 |
"user": "isaacs", |
| 134 |
}, |
| 135 |
"name": "gitthing", |
| 136 |
"raw": "gitthing@git+ssh://[email protected]/isaacs/abbrev-js#a9ee72ebc8fe3975f1b0c7aeb3a8f2a806a432eb", |
| 137 |
"rawSpec": "git+ssh://[email protected]/isaacs/abbrev-js#a9ee72ebc8fe3975f1b0c7aeb3a8f2a806a432eb", |
| 138 |
"registry": undefined, |
| 139 |
"saveSpec": "git+ssh://[email protected]/isaacs/abbrev-js.git#a9ee72ebc8fe3975f1b0c7aeb3a8f2a806a432eb", |
| 140 |
"scope": undefined, |
| 141 |
"type": "git", |
| 142 |
"where": undefined, |
| 143 |
} |
| 144 |
` |
| 145 |
|
| 146 |
exports[`test/spec-from-lock.js TAP > legacy metadata with "from" and no integrity 1`] = ` |
| 147 |
Result { |
| 148 |
"escapedName": "legacy", |
| 149 |
"fetchSpec": "1.2.3", |
| 150 |
"gitCommittish": undefined, |
| 151 |
"gitRange": undefined, |
| 152 |
"gitSubdir": undefined, |
| 153 |
"hosted": undefined, |
| 154 |
"name": "legacy", |
| 155 |
"raw": "[email protected]", |
| 156 |
"rawSpec": "1.2.3", |
| 157 |
"registry": true, |
| 158 |
"saveSpec": null, |
| 159 |
"scope": undefined, |
| 160 |
"type": "version", |
| 161 |
"where": undefined, |
| 162 |
} |
| 163 |
` |
| 164 |
|
| 165 |
exports[`test/spec-from-lock.js TAP > version (file) and integrity set 1`] = ` |
| 166 |
Result { |
| 167 |
"escapedName": "x", |
| 168 |
"fetchSpec": "{CWD}/foo.tgz", |
| 169 |
"gitCommittish": undefined, |
| 170 |
"gitRange": undefined, |
| 171 |
"gitSubdir": undefined, |
| 172 |
"hosted": undefined, |
| 173 |
"name": "x", |
| 174 |
"raw": "[email protected]", |
| 175 |
"rawSpec": "foo.tgz", |
| 176 |
"registry": undefined, |
| 177 |
"saveSpec": "file:foo.tgz", |
| 178 |
"scope": undefined, |
| 179 |
"type": "file", |
| 180 |
"where": "{CWD}", |
| 181 |
} |
| 182 |
` |
| 183 |
|
| 184 |
exports[`test/spec-from-lock.js TAP > version and integrity 1`] = ` |
| 185 |
Result { |
| 186 |
"escapedName": "x", |
| 187 |
"fetchSpec": "1.2.3", |
| 188 |
"gitCommittish": undefined, |
| 189 |
"gitRange": undefined, |
| 190 |
"gitSubdir": undefined, |
| 191 |
"hosted": undefined, |
| 192 |
"name": "x", |
| 193 |
"raw": "[email protected]", |
| 194 |
"rawSpec": "1.2.3", |
| 195 |
"registry": true, |
| 196 |
"saveSpec": null, |
| 197 |
"scope": undefined, |
| 198 |
"type": "version", |
| 199 |
"where": undefined, |
| 200 |
} |
| 201 |
` |
| 202 |
|
| 203 |
exports[`test/spec-from-lock.js TAP > version and range, no integrity 1`] = ` |
| 204 |
Result { |
| 205 |
"escapedName": "x", |
| 206 |
"fetchSpec": "1.2.3", |
| 207 |
"gitCommittish": undefined, |
| 208 |
"gitRange": undefined, |
| 209 |
"gitSubdir": undefined, |
| 210 |
"hosted": undefined, |
| 211 |
"name": "x", |
| 212 |
"raw": "[email protected]", |
| 213 |
"rawSpec": "1.2.3", |
| 214 |
"registry": true, |
| 215 |
"saveSpec": null, |
| 216 |
"scope": undefined, |
| 217 |
"type": "version", |
| 218 |
"where": undefined, |
| 219 |
} |
| 220 |
` |