|
| 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/lib/commands/pkg.js TAP delete multiple field > should delete multiple fields from package.json 1`] = ` |
| 9 | +Object { |
| 10 | + "name": "foo", |
| 11 | +} |
| 12 | +` |
| 13 | + |
| 14 | +exports[`test/lib/commands/pkg.js TAP delete nested field > should delete nested fields from package.json 1`] = ` |
| 15 | +Object { |
| 16 | + "info": Object { |
| 17 | + "foo": Object { |
| 18 | + "bar": Array [ |
| 19 | + Object {}, |
| 20 | + ], |
| 21 | + }, |
| 22 | + }, |
| 23 | + "name": "foo", |
| 24 | + "version": "1.0.0", |
| 25 | +} |
| 26 | +` |
| 27 | + |
| 28 | +exports[`test/lib/commands/pkg.js TAP delete single field > should delete single field from package.json 1`] = ` |
| 29 | +Object { |
| 30 | + "name": "foo", |
| 31 | +} |
| 32 | +` |
| 33 | + |
| 34 | +exports[`test/lib/commands/pkg.js TAP fix > fixes package.json issues 1`] = ` |
| 35 | +Object { |
| 36 | + "name": "foo", |
| 37 | + "version": "1.1.1", |
| 38 | +} |
| 39 | +` |
| 40 | + |
| 41 | +exports[`test/lib/commands/pkg.js TAP get array field > should print retrieved array field 1`] = ` |
| 42 | +[ |
| 43 | + "index.js", |
| 44 | + "cli.js" |
| 45 | +] |
| 46 | +` |
| 47 | + |
| 48 | +exports[`test/lib/commands/pkg.js TAP get array item > should print retrieved array field 1`] = ` |
| 49 | +
|
| 50 | +` |
| 51 | + |
| 52 | +exports[`test/lib/commands/pkg.js TAP get array nested items notation > should print json result containing matching results 1`] = ` |
| 53 | +{ |
| 54 | + "contributors[0].name": "Ruy", |
| 55 | + "contributors[1].name": "Gar" |
| 56 | +} |
| 57 | +` |
| 58 | + |
| 59 | +exports[`test/lib/commands/pkg.js TAP get multiple arg > should print retrieved package.json fields 1`] = ` |
| 60 | +{ |
| 61 | + "name": "foo", |
| 62 | + "version": "1.1.1" |
| 63 | +} |
| 64 | +` |
| 65 | + |
| 66 | +exports[`test/lib/commands/pkg.js TAP get multiple arg with empty value > should print retrieved package.json field regardless of empty value 1`] = ` |
| 67 | +{ |
| 68 | + "name": "foo", |
| 69 | + "author": "" |
| 70 | +} |
| 71 | +` |
| 72 | + |
| 73 | +exports[`test/lib/commands/pkg.js TAP get multiple arg with only one arg existing > should print retrieved package.json field 1`] = ` |
| 74 | +{ |
| 75 | + "name": "foo" |
| 76 | +} |
| 77 | +` |
| 78 | + |
| 79 | +exports[`test/lib/commands/pkg.js TAP get nested arg > node test.js 1`] = ` |
| 80 | +"node test.js" |
| 81 | +` |
| 82 | + |
| 83 | +exports[`test/lib/commands/pkg.js TAP get no args > should print package.json content 1`] = ` |
| 84 | +{ |
| 85 | + "name": "foo", |
| 86 | + "version": "1.1.1" |
| 87 | +} |
| 88 | +` |
| 89 | + |
| 90 | +exports[`test/lib/commands/pkg.js TAP get single arg > should print retrieved package.json field 1`] = ` |
| 91 | +"1.1.1" |
| 92 | +` |
| 93 | + |
| 94 | +exports[`test/lib/commands/pkg.js TAP push to array syntax > should append to arrays using empty bracket syntax 1`] = ` |
| 95 | +Object { |
| 96 | + "keywords": Array [ |
| 97 | + "foo", |
| 98 | + "bar", |
| 99 | + "baz", |
| 100 | + ], |
| 101 | + "name": "foo", |
| 102 | + "version": "1.1.1", |
| 103 | +} |
| 104 | +` |
| 105 | + |
| 106 | +exports[`test/lib/commands/pkg.js TAP set --json > should add fields to package.json 1`] = ` |
| 107 | +Object { |
| 108 | + "description": "awesome", |
| 109 | + "foo": Object { |
| 110 | + "bar": Object { |
| 111 | + "baz": "BAZ", |
| 112 | + }, |
| 113 | + }, |
| 114 | + "name": "foo", |
| 115 | + "private": true, |
| 116 | + "tap": Object { |
| 117 | + "timeout": 60, |
| 118 | + }, |
| 119 | + "version": "1.1.1", |
| 120 | + "workspaces": Array [ |
| 121 | + "packages/*", |
| 122 | + ], |
| 123 | +} |
| 124 | +` |
| 125 | + |
| 126 | +exports[`test/lib/commands/pkg.js TAP set = separate value > should add single field to package.json 1`] = ` |
| 127 | +Object { |
| 128 | + "name": "foo", |
| 129 | + "tap": Object { |
| 130 | + "test-env": Array [ |
| 131 | + "LC_ALL=sk", |
| 132 | + ], |
| 133 | + }, |
| 134 | + "version": "1.1.1", |
| 135 | +} |
| 136 | +` |
| 137 | + |
| 138 | +exports[`test/lib/commands/pkg.js TAP set multiple fields > should add single field to package.json 1`] = ` |
| 139 | +Object { |
| 140 | + "bin": Object { |
| 141 | + "foo": "foo.js", |
| 142 | + }, |
| 143 | + "name": "foo", |
| 144 | + "scripts": Object { |
| 145 | + "test": "node test.js", |
| 146 | + }, |
| 147 | + "version": "1.1.1", |
| 148 | +} |
| 149 | +` |
| 150 | + |
| 151 | +exports[`test/lib/commands/pkg.js TAP set single field > should add single field to package.json 1`] = ` |
| 152 | +Object { |
| 153 | + "description": "Awesome stuff", |
| 154 | + "name": "foo", |
| 155 | + "version": "1.1.1", |
| 156 | +} |
| 157 | +` |
| 158 | + |
| 159 | +exports[`test/lib/commands/pkg.js TAP single workspace multiple args > should only return info for one workspace 1`] = ` |
| 160 | +{ |
| 161 | + "a": { |
| 162 | + "name": "a", |
| 163 | + "version": "1.0.0" |
| 164 | + } |
| 165 | +} |
| 166 | +` |
| 167 | + |
| 168 | +exports[`test/lib/commands/pkg.js TAP single workspace single arg > should only return info for one workspace 1`] = ` |
| 169 | +{ |
| 170 | + "a": "1.0.0" |
| 171 | +} |
| 172 | +` |
| 173 | + |
| 174 | +exports[`test/lib/commands/pkg.js TAP workspaces get > should return expected result for configured workspaces 1`] = ` |
| 175 | +{ |
| 176 | + "a": { |
| 177 | + "name": "a", |
| 178 | + "version": "1.0.0" |
| 179 | + }, |
| 180 | + "b": { |
| 181 | + "name": "b", |
| 182 | + "version": "1.2.3" |
| 183 | + } |
| 184 | +} |
| 185 | +` |
| 186 | + |
| 187 | +exports[`test/lib/commands/pkg.js TAP workspaces set > should add field to workspace a 1`] = ` |
| 188 | +Object { |
| 189 | + "funding": "http://example.com", |
| 190 | + "name": "a", |
| 191 | + "version": "1.0.0", |
| 192 | +} |
| 193 | +` |
| 194 | + |
| 195 | +exports[`test/lib/commands/pkg.js TAP workspaces set > should add field to workspace b 1`] = ` |
| 196 | +Object { |
| 197 | + "funding": "http://example.com", |
| 198 | + "name": "b", |
| 199 | + "version": "1.2.3", |
| 200 | +} |
| 201 | +` |
| 202 | + |
| 203 | +exports[`test/lib/commands/pkg.js TAP workspaces set > should delete version field from workspace a 1`] = ` |
| 204 | +Object { |
| 205 | + "funding": "http://example.com", |
| 206 | + "name": "a", |
| 207 | +} |
| 208 | +` |
| 209 | + |
| 210 | +exports[`test/lib/commands/pkg.js TAP workspaces set > should delete version field from workspace b 1`] = ` |
| 211 | +Object { |
| 212 | + "funding": "http://example.com", |
| 213 | + "name": "b", |
| 214 | +} |
| 215 | +` |
0 commit comments