@neurodevs/ndx-cli 0.1.55 → 0.1.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/__tests__/AbstractCommandRunnerTest.d.ts +66 -0
- package/build/__tests__/AbstractCommandRunnerTest.js +264 -0
- package/build/__tests__/AbstractCommandRunnerTest.js.map +1 -0
- package/build/__tests__/modules/CliCommandRunner.test.d.ts +2 -94
- package/build/__tests__/modules/CliCommandRunner.test.js +2 -675
- package/build/__tests__/modules/CliCommandRunner.test.js.map +1 -1
- package/build/__tests__/modules/commands/BindSnippetCommand.test.d.ts +20 -0
- package/build/__tests__/modules/commands/BindSnippetCommand.test.js +111 -0
- package/build/__tests__/modules/commands/BindSnippetCommand.test.js.map +1 -0
- package/build/__tests__/modules/commands/CreateImplCommand.test.d.ts +13 -0
- package/build/__tests__/modules/commands/CreateImplCommand.test.js +112 -0
- package/build/__tests__/modules/commands/CreateImplCommand.test.js.map +1 -0
- package/build/__tests__/modules/commands/CreatePackageCommand.test.d.ts +10 -0
- package/build/__tests__/modules/commands/CreatePackageCommand.test.js +98 -0
- package/build/__tests__/modules/commands/CreatePackageCommand.test.js.map +1 -0
- package/build/__tests__/modules/commands/CreateUiCommand.test.d.ts +22 -0
- package/build/__tests__/modules/commands/CreateUiCommand.test.js +220 -0
- package/build/__tests__/modules/commands/CreateUiCommand.test.js.map +1 -0
- package/build/__tests__/modules/commands/UpgradePackageCommand.test.d.ts +11 -0
- package/build/__tests__/modules/commands/UpgradePackageCommand.test.js +90 -0
- package/build/__tests__/modules/commands/UpgradePackageCommand.test.js.map +1 -0
- package/build/modules/CliCommandRunner.d.ts +4 -2
- package/build/modules/CliCommandRunner.js +18 -7
- package/build/modules/CliCommandRunner.js.map +1 -1
- package/build/modules/commands/BindSnippetCommand.d.ts +16 -0
- package/build/modules/commands/BindSnippetCommand.js +67 -0
- package/build/modules/commands/BindSnippetCommand.js.map +1 -0
- package/package.json +2 -2
- package/src/__tests__/AbstractCommandRunnerTest.ts +321 -0
- package/src/__tests__/modules/CliCommandRunner.test.ts +3 -910
- package/src/__tests__/modules/commands/BindSnippetCommand.test.ts +129 -0
- package/src/__tests__/modules/commands/CreateImplCommand.test.ts +137 -0
- package/src/__tests__/modules/commands/CreatePackageCommand.test.ts +113 -0
- package/src/__tests__/modules/commands/CreateUiCommand.test.ts +297 -0
- package/src/__tests__/modules/commands/UpgradePackageCommand.test.ts +105 -0
- package/src/modules/CliCommandRunner.ts +19 -7
- package/src/modules/commands/BindSnippetCommand.ts +75 -0
|
@@ -1,75 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
2
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
3
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
4
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
5
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
7
|
};
|
|
24
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
-
var ownKeys = function(o) {
|
|
26
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
-
var ar = [];
|
|
28
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
-
return ar;
|
|
30
|
-
};
|
|
31
|
-
return ownKeys(o);
|
|
32
|
-
};
|
|
33
|
-
return function (mod) {
|
|
34
|
-
if (mod && mod.__esModule) return mod;
|
|
35
|
-
var result = {};
|
|
36
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
-
__setModuleDefault(result, mod);
|
|
38
|
-
return result;
|
|
39
|
-
};
|
|
40
|
-
})();
|
|
41
8
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
42
9
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
43
10
|
};
|
|
44
|
-
var _a;
|
|
45
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
-
const child_process_1 = require("child_process");
|
|
47
|
-
const os_1 = __importDefault(require("os"));
|
|
48
|
-
const path_1 = __importDefault(require("path"));
|
|
49
|
-
const util_1 = require("util");
|
|
50
12
|
const test_utils_1 = require("@sprucelabs/test-utils");
|
|
51
13
|
const fake_node_core_1 = require("@neurodevs/fake-node-core");
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
const fakePrompts_1 = __importStar(require("../../testDoubles/prompts/fakePrompts"));
|
|
55
|
-
const AbstractPackageTest_1 = __importDefault(require("../AbstractPackageTest"));
|
|
56
|
-
const exec = (0, util_1.promisify)(child_process_1.exec);
|
|
57
|
-
class CliCommandRunnerTest extends AbstractPackageTest_1.default {
|
|
58
|
-
static get keywordsWithDefaults() {
|
|
59
|
-
return [...this.defaultKeywords, ...this.keywords];
|
|
60
|
-
}
|
|
14
|
+
const AbstractCommandRunnerTest_1 = __importDefault(require("../AbstractCommandRunnerTest"));
|
|
15
|
+
class CliCommandRunnerTest extends AbstractCommandRunnerTest_1.default {
|
|
61
16
|
static async beforeEach() {
|
|
62
17
|
await super.beforeEach();
|
|
63
|
-
this.setFakeImplAutomodule();
|
|
64
|
-
this.setFakeUiAutomodule();
|
|
65
|
-
this.setFakeAutopackage();
|
|
66
|
-
this.setFakeExec();
|
|
67
|
-
this.setFakeLog();
|
|
68
|
-
this.setFakeMkdir();
|
|
69
|
-
this.setFakePrompts();
|
|
70
|
-
this.setFakeReadFile();
|
|
71
|
-
this.setFakeWriteFile();
|
|
72
|
-
process.env.GITHUB_TOKEN = this.githubToken;
|
|
73
18
|
}
|
|
74
19
|
static async throwsIfCommandIsNotSupported() {
|
|
75
20
|
const invalidArg = (0, test_utils_1.generateId)();
|
|
@@ -77,248 +22,6 @@ class CliCommandRunnerTest extends AbstractPackageTest_1.default {
|
|
|
77
22
|
const err = await test_utils_1.assert.doesThrowAsync(async () => await instance.run());
|
|
78
23
|
test_utils_1.assert.isEqual(err.message, `The command "${invalidArg}" is not supported!`, 'Did not receive the expected error!');
|
|
79
24
|
}
|
|
80
|
-
static async createImplCreatesInstance() {
|
|
81
|
-
const instance = await this.runCreateImpl();
|
|
82
|
-
test_utils_1.assert.isTruthy(instance, `Failed to create instance for ${this.createImplCommand}!`);
|
|
83
|
-
}
|
|
84
|
-
static async createImplPromptsUserForInput() {
|
|
85
|
-
await this.runCreateImpl();
|
|
86
|
-
test_utils_1.assert.isEqualDeep(fakePrompts_1.callsToFakePrompts[0], [
|
|
87
|
-
{
|
|
88
|
-
type: 'text',
|
|
89
|
-
name: 'interfaceName',
|
|
90
|
-
message: this.interfaceNameMessage,
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
type: 'text',
|
|
94
|
-
name: 'implName',
|
|
95
|
-
message: this.implNameMessage,
|
|
96
|
-
},
|
|
97
|
-
], 'Did not prompt user for expected input!');
|
|
98
|
-
}
|
|
99
|
-
static async createImplDoesNotContinueIfPromptsIsInterrupted() {
|
|
100
|
-
await this.runCreateImpl({
|
|
101
|
-
interfaceName: '',
|
|
102
|
-
implName: '',
|
|
103
|
-
});
|
|
104
|
-
test_utils_1.assert.isEqual(meta_node_1.FakeAutomodule.numCallsToRun, 0, 'Should not have called run on ImplAutomodule!');
|
|
105
|
-
}
|
|
106
|
-
static async createImplCreatesTestSaveDirIfNotExists() {
|
|
107
|
-
await this.runCreateImpl();
|
|
108
|
-
test_utils_1.assert.isEqualDeep(fake_node_core_1.callsToMkdir[0], { path: this.implTestSaveDir, options: { recursive: true } }, 'Did not create test save dir!');
|
|
109
|
-
}
|
|
110
|
-
static async createImplCreatesModuleSaveDirIfNotExists() {
|
|
111
|
-
await this.runCreateImpl();
|
|
112
|
-
test_utils_1.assert.isEqualDeep(fake_node_core_1.callsToMkdir[1], { path: this.implModuleSaveDir, options: { recursive: true } }, 'Did not create module save dir!');
|
|
113
|
-
}
|
|
114
|
-
static async createImplCreatesFakeSaveDirIfNotExists() {
|
|
115
|
-
await this.runCreateImpl();
|
|
116
|
-
test_utils_1.assert.isEqualDeep(fake_node_core_1.callsToMkdir[2], {
|
|
117
|
-
path: `src/testDoubles/${this.interfaceName}`,
|
|
118
|
-
options: { recursive: true },
|
|
119
|
-
}, 'Did not create fake save dir!');
|
|
120
|
-
}
|
|
121
|
-
static async createImplCreatesImplAutomodule() {
|
|
122
|
-
await this.runCreateImpl();
|
|
123
|
-
test_utils_1.assert.isEqualDeep(meta_node_1.FakeAutomodule.callsToConstructor[0], {
|
|
124
|
-
testSaveDir: this.implTestSaveDir,
|
|
125
|
-
moduleSaveDir: this.implModuleSaveDir,
|
|
126
|
-
fakeSaveDir: this.implFakeSaveDir,
|
|
127
|
-
interfaceName: this.interfaceName,
|
|
128
|
-
implName: this.implName,
|
|
129
|
-
}, 'Did not create ImplAutomodule with expected options!');
|
|
130
|
-
}
|
|
131
|
-
static async createImplRunsImplAutomodule() {
|
|
132
|
-
await this.runCreateImpl();
|
|
133
|
-
test_utils_1.assert.isEqual(meta_node_1.FakeAutomodule.numCallsToRun, 1, 'Did not call run on ImplAutomodule!');
|
|
134
|
-
}
|
|
135
|
-
static async createPackageCreatesInstance() {
|
|
136
|
-
const instance = await this.runCreatePackage();
|
|
137
|
-
test_utils_1.assert.isTruthy(instance, `Failed to create instance for ${this.createPackageCommand}!`);
|
|
138
|
-
}
|
|
139
|
-
static async createPackagePromptsUserForInput() {
|
|
140
|
-
await this.runCreatePackage();
|
|
141
|
-
test_utils_1.assert.isEqualDeep(JSON.stringify(fakePrompts_1.callsToFakePrompts[0]), JSON.stringify([
|
|
142
|
-
{
|
|
143
|
-
type: 'text',
|
|
144
|
-
name: 'packageName',
|
|
145
|
-
message: this.packageNameMessage,
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
type: 'text',
|
|
149
|
-
name: 'description',
|
|
150
|
-
message: this.packageDescriptionMessage,
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
type: 'text',
|
|
154
|
-
name: 'keywords',
|
|
155
|
-
message: 'Enter keywords (comma or space separated, lowercase, optional):',
|
|
156
|
-
initial: '',
|
|
157
|
-
format: (value) => value ? this.splitOnCommaOrWhitespace(value) : [],
|
|
158
|
-
},
|
|
159
|
-
]), 'Did not prompt user for expected input!');
|
|
160
|
-
}
|
|
161
|
-
static async createPackageDoesNotContinueIfPromptsIsInterrupted() {
|
|
162
|
-
await this.runCreatePackage({
|
|
163
|
-
packageName: '',
|
|
164
|
-
description: '',
|
|
165
|
-
});
|
|
166
|
-
test_utils_1.assert.isEqual(meta_node_1.FakeAutopackage.numCallsToRun, 0, 'Should not have called run on Autopackage!');
|
|
167
|
-
}
|
|
168
|
-
static async createPackageCreatesNpmAutopackage() {
|
|
169
|
-
await this.runCreatePackage();
|
|
170
|
-
test_utils_1.assert.isEqualDeep(meta_node_1.FakeAutopackage.callsToConstructor[0], {
|
|
171
|
-
name: this.packageName,
|
|
172
|
-
description: this.description,
|
|
173
|
-
keywords: this.keywordsWithDefaults,
|
|
174
|
-
gitNamespace: 'neurodevs',
|
|
175
|
-
npmNamespace: 'neurodevs',
|
|
176
|
-
installDir: this.expandHomeDir('~/dev'),
|
|
177
|
-
license: 'MIT',
|
|
178
|
-
author: 'Eric Yates <hello@ericthecurious.com>',
|
|
179
|
-
}, 'Did not create NpmAutopackage with expected options!');
|
|
180
|
-
}
|
|
181
|
-
static async createPackageRunsNpmAutopackage() {
|
|
182
|
-
await this.runCreatePackage();
|
|
183
|
-
test_utils_1.assert.isEqual(meta_node_1.FakeAutopackage.numCallsToRun, 1, 'Did not call run on NpmAutopackage!');
|
|
184
|
-
}
|
|
185
|
-
static async createUiCreatesInstance() {
|
|
186
|
-
const instance = await this.runCreateUi();
|
|
187
|
-
test_utils_1.assert.isTruthy(instance, `Failed to create instance for ${this.createUiCommand}!`);
|
|
188
|
-
}
|
|
189
|
-
static async createUiPromptsInstallDependenciesIfMissing() {
|
|
190
|
-
this.setFakeReadToEmptyPackageJson();
|
|
191
|
-
await this.runCreateUi();
|
|
192
|
-
test_utils_1.assert.isEqualDeep(fakePrompts_1.callsToFakePrompts[0], [
|
|
193
|
-
{
|
|
194
|
-
type: 'confirm',
|
|
195
|
-
name: 'shouldInstall',
|
|
196
|
-
message: 'Some required dependencies are missing! Press Enter to install, or any other key to abort.',
|
|
197
|
-
initial: true,
|
|
198
|
-
},
|
|
199
|
-
], 'Did not prompt user for expected input!');
|
|
200
|
-
}
|
|
201
|
-
static async createUiInstallsDependenciesIfMissing() {
|
|
202
|
-
this.setFakeReadToEmptyPackageJson();
|
|
203
|
-
await this.runCreateUi({
|
|
204
|
-
shouldInstall: true,
|
|
205
|
-
});
|
|
206
|
-
test_utils_1.assert.isEqualDeep(fake_node_core_1.callsToExec[0], this.installDependenciesCommand, 'Did not install dependencies!');
|
|
207
|
-
}
|
|
208
|
-
static async createUiInstallsDevDependenciesIfMissing() {
|
|
209
|
-
this.setFakeReadToEmptyPackageJson();
|
|
210
|
-
await this.runCreateUi({
|
|
211
|
-
shouldInstall: true,
|
|
212
|
-
});
|
|
213
|
-
test_utils_1.assert.isEqualDeep(fake_node_core_1.callsToExec[1], this.installDevDependenciesCommand, 'Did not install dependencies!');
|
|
214
|
-
}
|
|
215
|
-
static async createUiInstallsIfAnyDepIsMissing() {
|
|
216
|
-
for (const dep of this.allRequiredDependencies) {
|
|
217
|
-
this.setFakeReadToAllInstalledExcept(dep);
|
|
218
|
-
(0, fake_node_core_1.resetCallsToExec)();
|
|
219
|
-
await this.runCreateUi({
|
|
220
|
-
shouldInstall: true,
|
|
221
|
-
});
|
|
222
|
-
test_utils_1.assert.isEqual(fake_node_core_1.callsToExec[1], this.installDevDependenciesCommand, 'Should not have installed devDependencies!');
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
static async createUiUpdatesTsconfigIfDepsWereMissing() {
|
|
226
|
-
this.setFakeReadToEmptyPackageJson();
|
|
227
|
-
this.setFakeReadFileResultToTsconfig();
|
|
228
|
-
await this.runCreateUi({
|
|
229
|
-
shouldInstall: true,
|
|
230
|
-
});
|
|
231
|
-
test_utils_1.assert.isEqualDeep(fake_node_core_1.callsToWriteFile[0], {
|
|
232
|
-
file: this.tsconfigPath,
|
|
233
|
-
data: this.updatedTsconfigFile,
|
|
234
|
-
options: undefined,
|
|
235
|
-
}, 'Did not update tsconfig!');
|
|
236
|
-
}
|
|
237
|
-
static async createUiCreatesSetupTestsIfDepsWereMissing() {
|
|
238
|
-
this.setFakeReadToEmptyPackageJson();
|
|
239
|
-
await this.runCreateUi({
|
|
240
|
-
shouldInstall: true,
|
|
241
|
-
});
|
|
242
|
-
test_utils_1.assert.isEqualDeep(fake_node_core_1.callsToWriteFile[1], {
|
|
243
|
-
file: 'src/__tests__/setupTests.ts',
|
|
244
|
-
data: this.setupTestsFile,
|
|
245
|
-
options: undefined,
|
|
246
|
-
}, 'Did not create setupTests script!');
|
|
247
|
-
}
|
|
248
|
-
static async createUiAddsSetupTestsToPackageJsonIfDepsWereMissing() {
|
|
249
|
-
this.setFakeReadToEmptyPackageJson();
|
|
250
|
-
await this.runCreateUi({
|
|
251
|
-
shouldInstall: true,
|
|
252
|
-
});
|
|
253
|
-
test_utils_1.assert.isEqualDeep(fake_node_core_1.callsToWriteFile[2], {
|
|
254
|
-
file: 'package.json',
|
|
255
|
-
data: JSON.stringify({
|
|
256
|
-
jest: {
|
|
257
|
-
setupFiles: [
|
|
258
|
-
'<rootDir>/build/__tests__/setupTests.js',
|
|
259
|
-
],
|
|
260
|
-
},
|
|
261
|
-
}, null, 4),
|
|
262
|
-
options: undefined,
|
|
263
|
-
}, 'Did not update package.json!');
|
|
264
|
-
}
|
|
265
|
-
static async createUiRecompilesTypescriptIfDepsWereMissing() {
|
|
266
|
-
this.setFakeReadToEmptyPackageJson();
|
|
267
|
-
await this.runCreateUi({
|
|
268
|
-
shouldInstall: true,
|
|
269
|
-
});
|
|
270
|
-
test_utils_1.assert.isEqualDeep(fake_node_core_1.callsToExec[2], 'npx tsc', 'Did not recompile typescript!');
|
|
271
|
-
}
|
|
272
|
-
static async createUiDoesNotPromptIfDependenciesAreInstalled() {
|
|
273
|
-
this.setFakeReadToAllInstalled();
|
|
274
|
-
await this.runCreateUi();
|
|
275
|
-
test_utils_1.assert.isEqual(fakePrompts_1.callsToFakePrompts.length, 1, 'Prompted too many times!');
|
|
276
|
-
}
|
|
277
|
-
static async createUiPromptsUserForInput() {
|
|
278
|
-
this.setFakeReadToAllInstalled();
|
|
279
|
-
await this.runCreateUi();
|
|
280
|
-
test_utils_1.assert.isEqualDeep(fakePrompts_1.callsToFakePrompts[0], [
|
|
281
|
-
{
|
|
282
|
-
type: 'text',
|
|
283
|
-
name: 'componentName',
|
|
284
|
-
message: this.componentNameMessage,
|
|
285
|
-
},
|
|
286
|
-
], 'Did not prompt user for expected input!');
|
|
287
|
-
}
|
|
288
|
-
static async createUiDoesNotContinueIfPromptsIsInterrupted() {
|
|
289
|
-
await this.runCreateUi({
|
|
290
|
-
componentName: '',
|
|
291
|
-
});
|
|
292
|
-
test_utils_1.assert.isEqual(meta_node_1.FakeAutomodule.numCallsToRun, 0, 'Should not have called run on UiAutomodule!');
|
|
293
|
-
}
|
|
294
|
-
static async createUiCreatesTestSaveDirIfNotExists() {
|
|
295
|
-
await this.runCreateUi();
|
|
296
|
-
test_utils_1.assert.isEqualDeep(fake_node_core_1.callsToMkdir[0], { path: this.uiTestSaveDir, options: { recursive: true } }, 'Did not create test save dir!');
|
|
297
|
-
}
|
|
298
|
-
static async createUiCreatesModuleSaveDirIfNotExists() {
|
|
299
|
-
await this.runCreateUi();
|
|
300
|
-
test_utils_1.assert.isEqualDeep(fake_node_core_1.callsToMkdir[1], { path: this.uiModuleSaveDir, options: { recursive: true } }, 'Did not create module save dir!');
|
|
301
|
-
}
|
|
302
|
-
static async createUiCreatesFakeSaveDirIfNotExists() {
|
|
303
|
-
await this.runCreateUi();
|
|
304
|
-
test_utils_1.assert.isEqualDeep(fake_node_core_1.callsToMkdir[2], {
|
|
305
|
-
path: this.uiFakeSaveDir,
|
|
306
|
-
options: { recursive: true },
|
|
307
|
-
}, 'Did not create fake save dir!');
|
|
308
|
-
}
|
|
309
|
-
static async createUiCreatesUiAutomodule() {
|
|
310
|
-
await this.runCreateUi();
|
|
311
|
-
test_utils_1.assert.isEqualDeep(meta_node_1.FakeAutomodule.callsToConstructor[0], {
|
|
312
|
-
testSaveDir: this.uiTestSaveDir,
|
|
313
|
-
moduleSaveDir: this.uiModuleSaveDir,
|
|
314
|
-
fakeSaveDir: this.uiFakeSaveDir,
|
|
315
|
-
componentName: this.componentName,
|
|
316
|
-
}, 'Did not create UiAutomodule with expected options!');
|
|
317
|
-
}
|
|
318
|
-
static async createUiRunsUiAutomodule() {
|
|
319
|
-
await this.runCreateUi();
|
|
320
|
-
test_utils_1.assert.isEqual(meta_node_1.FakeAutomodule.numCallsToRun, 1, 'Did not call run on UiAutomodule!');
|
|
321
|
-
}
|
|
322
25
|
static async helpOutputsHelpTextToConsole() {
|
|
323
26
|
const instance = this.CliCommandRunner(['help']);
|
|
324
27
|
await instance.run();
|
|
@@ -334,369 +37,11 @@ class CliCommandRunnerTest extends AbstractPackageTest_1.default {
|
|
|
334
37
|
await instance.run();
|
|
335
38
|
test_utils_1.assert.isEqual(fake_node_core_1.callsToLog[0]?.message, this.helpText, 'Help command should not execute any shell commands!');
|
|
336
39
|
}
|
|
337
|
-
static async upgradePackageCreatesInstance() {
|
|
338
|
-
const instance = await this.runUpgradePackage();
|
|
339
|
-
test_utils_1.assert.isTruthy(instance, `Failed to create instance for ${this.upgradePackageCommand}!`);
|
|
340
|
-
}
|
|
341
|
-
static async upgradePackageCreatesNpmAutopackage() {
|
|
342
|
-
await this.runUpgradePackage();
|
|
343
|
-
test_utils_1.assert.isEqualDeep(meta_node_1.FakeAutopackage.callsToConstructor[0], {
|
|
344
|
-
...this.infoFromPackageJson,
|
|
345
|
-
name: `${this.packageName}`,
|
|
346
|
-
gitNamespace: 'neurodevs',
|
|
347
|
-
npmNamespace: 'neurodevs',
|
|
348
|
-
installDir: this.expandHomeDir('~/dev'),
|
|
349
|
-
license: 'MIT',
|
|
350
|
-
author: 'Eric Yates <hello@ericthecurious.com>',
|
|
351
|
-
}, 'Did not create NpmAutopackage with expected options!');
|
|
352
|
-
}
|
|
353
|
-
static async upgradePackageRunsNpmAutopackage() {
|
|
354
|
-
await this.runUpgradePackage();
|
|
355
|
-
test_utils_1.assert.isEqual(meta_node_1.FakeAutopackage.numCallsToRun, 1, 'Did not call run on NpmAutopackage!');
|
|
356
|
-
}
|
|
357
|
-
static async upgradePackageAddsDefaultKeywordsIfMissing() {
|
|
358
|
-
await this.runUpgradePackage({
|
|
359
|
-
name: this.packageName,
|
|
360
|
-
description: this.description,
|
|
361
|
-
keywords: [],
|
|
362
|
-
});
|
|
363
|
-
test_utils_1.assert.isEqualDeep(meta_node_1.FakeAutopackage.callsToConstructor[0]?.keywords, this.defaultKeywords, 'Did not add default keywords!');
|
|
364
|
-
}
|
|
365
|
-
static async upgradePackageDoesNotOverwriteKeywordsEvenIfDefaultsMissing() {
|
|
366
|
-
const keywords = [(0, test_utils_1.generateId)(), (0, test_utils_1.generateId)()];
|
|
367
|
-
await this.runUpgradePackage({
|
|
368
|
-
name: this.packageName,
|
|
369
|
-
description: this.description,
|
|
370
|
-
keywords,
|
|
371
|
-
});
|
|
372
|
-
test_utils_1.assert.isEqualDeep(meta_node_1.FakeAutopackage.callsToConstructor[0]?.keywords, [...this.defaultKeywords, ...keywords], 'Should not have overwritten keywords!');
|
|
373
|
-
}
|
|
374
|
-
static async upgradePackageExtractsPackageNameFromScopedName() {
|
|
375
|
-
await this.runUpgradePackage({
|
|
376
|
-
name: this.packageName,
|
|
377
|
-
description: this.description,
|
|
378
|
-
keywords: this.keywordsWithDefaults,
|
|
379
|
-
});
|
|
380
|
-
test_utils_1.assert.isEqualDeep(meta_node_1.FakeAutopackage.callsToConstructor[0]?.name, this.packageName, 'Did not extract package name from scoped name!');
|
|
381
|
-
}
|
|
382
|
-
static async runCreateUi(responses) {
|
|
383
|
-
(0, fakePrompts_1.setFakeResponses)({
|
|
384
|
-
componentName: this.componentName,
|
|
385
|
-
...responses,
|
|
386
|
-
});
|
|
387
|
-
const instance = this.CliCommandRunner([this.createUiCommand]);
|
|
388
|
-
await instance.run();
|
|
389
|
-
return instance;
|
|
390
|
-
}
|
|
391
|
-
static setFakeReadFileResultToTsconfig() {
|
|
392
|
-
(0, fake_node_core_1.setFakeReadFileResult)(this.tsconfigPath, this.originalTsconfigFile);
|
|
393
|
-
}
|
|
394
|
-
static setFakeReadToEmptyPackageJson() {
|
|
395
|
-
(0, fake_node_core_1.setFakeReadFileResult)('package.json', '{}');
|
|
396
|
-
}
|
|
397
|
-
static setFakeReadToAllInstalledExcept(dep) {
|
|
398
|
-
(0, fake_node_core_1.setFakeReadFileResult)('package.json', this.allInstalled.replace(dep, ''));
|
|
399
|
-
}
|
|
400
|
-
static setFakeReadToAllInstalled() {
|
|
401
|
-
(0, fake_node_core_1.setFakeReadFileResult)('package.json', this.allInstalled);
|
|
402
|
-
}
|
|
403
|
-
static setFakePackageJson(responses) {
|
|
404
|
-
const infoFromPackageJson = {
|
|
405
|
-
...this.infoFromPackageJson,
|
|
406
|
-
...responses,
|
|
407
|
-
};
|
|
408
|
-
(0, fake_node_core_1.setFakeReadFileResult)('package.json', JSON.stringify(infoFromPackageJson));
|
|
409
|
-
return infoFromPackageJson;
|
|
410
|
-
}
|
|
411
|
-
static async runCreateImpl(responses) {
|
|
412
|
-
(0, fakePrompts_1.setFakeResponses)({
|
|
413
|
-
interfaceName: this.interfaceName,
|
|
414
|
-
implName: this.implName,
|
|
415
|
-
...responses,
|
|
416
|
-
});
|
|
417
|
-
const instance = this.CliCommandRunner([this.createImplCommand]);
|
|
418
|
-
await instance.run();
|
|
419
|
-
return instance;
|
|
420
|
-
}
|
|
421
|
-
static async runCreatePackage(responses) {
|
|
422
|
-
(0, fakePrompts_1.setFakeResponses)({
|
|
423
|
-
packageName: this.packageName,
|
|
424
|
-
description: this.description,
|
|
425
|
-
keywords: this.keywords,
|
|
426
|
-
...responses,
|
|
427
|
-
});
|
|
428
|
-
const instance = this.CliCommandRunner([this.createPackageCommand]);
|
|
429
|
-
await instance.run();
|
|
430
|
-
return instance;
|
|
431
|
-
}
|
|
432
|
-
static async runUpgradePackage(responses) {
|
|
433
|
-
this.setFakePackageJson(responses);
|
|
434
|
-
const instance = this.CliCommandRunner([this.upgradePackageCommand]);
|
|
435
|
-
await instance.run();
|
|
436
|
-
return instance;
|
|
437
|
-
}
|
|
438
|
-
static expandHomeDir(inputPath) {
|
|
439
|
-
return inputPath.startsWith('~')
|
|
440
|
-
? path_1.default.join(os_1.default.homedir(), inputPath.slice(1))
|
|
441
|
-
: inputPath;
|
|
442
|
-
}
|
|
443
|
-
static splitOnCommaOrWhitespace(value) {
|
|
444
|
-
return value
|
|
445
|
-
.split(/[\s,]+/)
|
|
446
|
-
.map((v) => v.trim())
|
|
447
|
-
.filter(Boolean);
|
|
448
|
-
}
|
|
449
|
-
static get implFakeSaveDir() {
|
|
450
|
-
return `src/testDoubles/${this.interfaceName}`;
|
|
451
|
-
}
|
|
452
|
-
static get uiFakeSaveDir() {
|
|
453
|
-
return `src/testDoubles/${this.componentName}`;
|
|
454
|
-
}
|
|
455
|
-
static setFakeImplAutomodule() {
|
|
456
|
-
meta_node_1.ImplAutomodule.Class = meta_node_1.FakeAutomodule;
|
|
457
|
-
meta_node_1.FakeAutomodule.resetTestDouble();
|
|
458
|
-
}
|
|
459
|
-
static setFakeUiAutomodule() {
|
|
460
|
-
meta_node_1.UiAutomodule.Class = meta_node_1.FakeAutomodule;
|
|
461
|
-
meta_node_1.FakeAutomodule.resetTestDouble();
|
|
462
|
-
}
|
|
463
|
-
static setFakeAutopackage() {
|
|
464
|
-
meta_node_1.NpmAutopackage.Class = meta_node_1.FakeAutopackage;
|
|
465
|
-
meta_node_1.FakeAutopackage.resetTestDouble();
|
|
466
|
-
}
|
|
467
|
-
static setFakeExec() {
|
|
468
|
-
CliCommandRunner_1.default.exec = fake_node_core_1.fakeExec;
|
|
469
|
-
(0, fake_node_core_1.resetCallsToExec)();
|
|
470
|
-
}
|
|
471
|
-
static setFakeLog() {
|
|
472
|
-
CliCommandRunner_1.default.log = fake_node_core_1.fakeLog;
|
|
473
|
-
(0, fake_node_core_1.resetCallsToLog)();
|
|
474
|
-
}
|
|
475
|
-
static setFakeMkdir() {
|
|
476
|
-
CliCommandRunner_1.default.mkdir = fake_node_core_1.fakeMkdir;
|
|
477
|
-
(0, fake_node_core_1.resetCallsToMkdir)();
|
|
478
|
-
}
|
|
479
|
-
static setFakePrompts() {
|
|
480
|
-
CliCommandRunner_1.default.prompts = fakePrompts_1.default;
|
|
481
|
-
(0, fakePrompts_1.resetCallsToFakePrompts)();
|
|
482
|
-
}
|
|
483
|
-
static setFakeReadFile() {
|
|
484
|
-
CliCommandRunner_1.default.readFile = fake_node_core_1.fakeReadFile;
|
|
485
|
-
(0, fake_node_core_1.resetCallsToReadFile)();
|
|
486
|
-
this.setFakeReadToAllInstalled();
|
|
487
|
-
this.setFakeReadFileResultToTsconfig();
|
|
488
|
-
}
|
|
489
|
-
static setFakeWriteFile() {
|
|
490
|
-
CliCommandRunner_1.default.writeFile =
|
|
491
|
-
fake_node_core_1.fakeWriteFile;
|
|
492
|
-
(0, fake_node_core_1.resetCallsToWriteFile)();
|
|
493
|
-
}
|
|
494
|
-
static CliCommandRunner(args) {
|
|
495
|
-
return CliCommandRunner_1.default.Create(args);
|
|
496
|
-
}
|
|
497
40
|
}
|
|
498
|
-
_a = CliCommandRunnerTest;
|
|
499
|
-
CliCommandRunnerTest.createImplCommand = 'create.impl';
|
|
500
|
-
CliCommandRunnerTest.interfaceName = (0, test_utils_1.generateId)();
|
|
501
|
-
CliCommandRunnerTest.implName = (0, test_utils_1.generateId)();
|
|
502
|
-
CliCommandRunnerTest.createPackageCommand = 'create.package';
|
|
503
|
-
CliCommandRunnerTest.packageName = (0, test_utils_1.generateId)();
|
|
504
|
-
CliCommandRunnerTest.description = (0, test_utils_1.generateId)();
|
|
505
|
-
CliCommandRunnerTest.keywords = [(0, test_utils_1.generateId)(), (0, test_utils_1.generateId)()];
|
|
506
|
-
CliCommandRunnerTest.githubToken = (0, test_utils_1.generateId)();
|
|
507
|
-
CliCommandRunnerTest.defaultKeywords = ['nodejs', 'typescript', 'tdd'];
|
|
508
|
-
CliCommandRunnerTest.createUiCommand = 'create.ui';
|
|
509
|
-
CliCommandRunnerTest.componentName = (0, test_utils_1.generateId)();
|
|
510
|
-
CliCommandRunnerTest.upgradePackageCommand = 'upgrade.package';
|
|
511
|
-
CliCommandRunnerTest.infoFromPackageJson = {
|
|
512
|
-
name: _a.packageName,
|
|
513
|
-
description: _a.description,
|
|
514
|
-
keywords: _a.keywordsWithDefaults,
|
|
515
|
-
};
|
|
516
|
-
CliCommandRunnerTest.allInstalled = `
|
|
517
|
-
{
|
|
518
|
-
"dependencies": {
|
|
519
|
-
"react": "^...",
|
|
520
|
-
"react-dom": "^..."
|
|
521
|
-
},
|
|
522
|
-
"devDependencies": {
|
|
523
|
-
"@types/react": "^...",
|
|
524
|
-
"@types/react-dom": "^...",
|
|
525
|
-
"@types/jsdom": "^...",
|
|
526
|
-
"@testing-library/react": "^...",
|
|
527
|
-
"@testing-library/dom": "^...",
|
|
528
|
-
"@testing-library/jest-dom": "^...",
|
|
529
|
-
"jsdom": "^..."
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
`;
|
|
533
|
-
CliCommandRunnerTest.allRequiredDependencies = [
|
|
534
|
-
'react',
|
|
535
|
-
'react-dom',
|
|
536
|
-
'@types/react',
|
|
537
|
-
'@types/react-dom',
|
|
538
|
-
'@types/jsdom',
|
|
539
|
-
'@testing-library/react',
|
|
540
|
-
'@testing-library/dom',
|
|
541
|
-
'@testing-library/jest-dom',
|
|
542
|
-
'jsdom',
|
|
543
|
-
];
|
|
544
|
-
CliCommandRunnerTest.installDependenciesCommand = 'yarn add react react-dom';
|
|
545
|
-
CliCommandRunnerTest.installDevDependenciesCommand = 'yarn add -D @types/react @types/react-dom @types/jsdom @testing-library/react @testing-library/dom @testing-library/jest-dom jsdom';
|
|
546
|
-
CliCommandRunnerTest.implTestSaveDir = 'src/__tests__/modules';
|
|
547
|
-
CliCommandRunnerTest.implModuleSaveDir = 'src/modules';
|
|
548
|
-
CliCommandRunnerTest.uiTestSaveDir = 'src/__tests__/ui';
|
|
549
|
-
CliCommandRunnerTest.uiModuleSaveDir = 'src/ui';
|
|
550
|
-
CliCommandRunnerTest.tsconfigPath = 'tsconfig.json';
|
|
551
|
-
CliCommandRunnerTest.randomId = (0, test_utils_1.generateId)();
|
|
552
|
-
CliCommandRunnerTest.originalTsconfigFile = JSON.stringify({
|
|
553
|
-
[this.randomId]: _a.randomId,
|
|
554
|
-
compilerOptions: {
|
|
555
|
-
[this.randomId]: _a.randomId,
|
|
556
|
-
},
|
|
557
|
-
}, null, 4);
|
|
558
|
-
CliCommandRunnerTest.updatedTsconfigFile = JSON.stringify({
|
|
559
|
-
[this.randomId]: _a.randomId,
|
|
560
|
-
compilerOptions: {
|
|
561
|
-
jsx: 'react-jsx',
|
|
562
|
-
[this.randomId]: _a.randomId,
|
|
563
|
-
},
|
|
564
|
-
include: ['src'],
|
|
565
|
-
}, null, 4);
|
|
566
|
-
CliCommandRunnerTest.interfaceNameMessage = 'What should the interface be called? Example: YourInterface';
|
|
567
|
-
CliCommandRunnerTest.implNameMessage = 'What should the implementation class be called? Example: YourInterfaceImpl';
|
|
568
|
-
CliCommandRunnerTest.packageNameMessage = 'What should the package be called? Example: useful-package';
|
|
569
|
-
CliCommandRunnerTest.packageDescriptionMessage = 'What should the package description be? Example: A useful package.';
|
|
570
|
-
CliCommandRunnerTest.componentNameMessage = 'What should the component be called? Example: YourComponent';
|
|
571
|
-
CliCommandRunnerTest.setupTestsFile = `
|
|
572
|
-
import { JSDOM } from 'jsdom'
|
|
573
|
-
|
|
574
|
-
const jsdom = new JSDOM('<!doctype html><html><body></body></html>', {
|
|
575
|
-
url: 'http://localhost',
|
|
576
|
-
})
|
|
577
|
-
|
|
578
|
-
global.window = jsdom.window as unknown as Window & typeof globalThis
|
|
579
|
-
global.document = jsdom.window.document
|
|
580
|
-
global.navigator = jsdom.window.navigator
|
|
581
|
-
global.HTMLElement = jsdom.window.HTMLElement
|
|
582
|
-
global.getComputedStyle = jsdom.window.getComputedStyle
|
|
583
|
-
|
|
584
|
-
global.ResizeObserver = class {
|
|
585
|
-
public observe() {}
|
|
586
|
-
public unobserve() {}
|
|
587
|
-
public disconnect() {}
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
global.SVGElement = jsdom.window.SVGElement
|
|
591
|
-
`;
|
|
592
|
-
CliCommandRunnerTest.helpText = `ndx CLI (Command Line Interface)
|
|
593
|
-
|
|
594
|
-
Available commands:
|
|
595
|
-
|
|
596
|
-
- create.impl Create implementation for interface with test and fake.
|
|
597
|
-
- create.package Create npm package using latest template.
|
|
598
|
-
- create.ui Create React component with test and fake.
|
|
599
|
-
- upgrade.package Upgrade existing npm package to latest template.
|
|
600
|
-
- help, --help, -h Show this help text.
|
|
601
|
-
|
|
602
|
-
Usage:
|
|
603
|
-
|
|
604
|
-
- ndx <command> [options]
|
|
605
|
-
`;
|
|
606
41
|
exports.default = CliCommandRunnerTest;
|
|
607
42
|
__decorate([
|
|
608
43
|
(0, test_utils_1.test)()
|
|
609
44
|
], CliCommandRunnerTest, "throwsIfCommandIsNotSupported", null);
|
|
610
|
-
__decorate([
|
|
611
|
-
(0, test_utils_1.test)()
|
|
612
|
-
], CliCommandRunnerTest, "createImplCreatesInstance", null);
|
|
613
|
-
__decorate([
|
|
614
|
-
(0, test_utils_1.test)()
|
|
615
|
-
], CliCommandRunnerTest, "createImplPromptsUserForInput", null);
|
|
616
|
-
__decorate([
|
|
617
|
-
(0, test_utils_1.test)()
|
|
618
|
-
], CliCommandRunnerTest, "createImplDoesNotContinueIfPromptsIsInterrupted", null);
|
|
619
|
-
__decorate([
|
|
620
|
-
(0, test_utils_1.test)()
|
|
621
|
-
], CliCommandRunnerTest, "createImplCreatesTestSaveDirIfNotExists", null);
|
|
622
|
-
__decorate([
|
|
623
|
-
(0, test_utils_1.test)()
|
|
624
|
-
], CliCommandRunnerTest, "createImplCreatesModuleSaveDirIfNotExists", null);
|
|
625
|
-
__decorate([
|
|
626
|
-
(0, test_utils_1.test)()
|
|
627
|
-
], CliCommandRunnerTest, "createImplCreatesFakeSaveDirIfNotExists", null);
|
|
628
|
-
__decorate([
|
|
629
|
-
(0, test_utils_1.test)()
|
|
630
|
-
], CliCommandRunnerTest, "createImplCreatesImplAutomodule", null);
|
|
631
|
-
__decorate([
|
|
632
|
-
(0, test_utils_1.test)()
|
|
633
|
-
], CliCommandRunnerTest, "createImplRunsImplAutomodule", null);
|
|
634
|
-
__decorate([
|
|
635
|
-
(0, test_utils_1.test)()
|
|
636
|
-
], CliCommandRunnerTest, "createPackageCreatesInstance", null);
|
|
637
|
-
__decorate([
|
|
638
|
-
(0, test_utils_1.test)()
|
|
639
|
-
], CliCommandRunnerTest, "createPackagePromptsUserForInput", null);
|
|
640
|
-
__decorate([
|
|
641
|
-
(0, test_utils_1.test)()
|
|
642
|
-
], CliCommandRunnerTest, "createPackageDoesNotContinueIfPromptsIsInterrupted", null);
|
|
643
|
-
__decorate([
|
|
644
|
-
(0, test_utils_1.test)()
|
|
645
|
-
], CliCommandRunnerTest, "createPackageCreatesNpmAutopackage", null);
|
|
646
|
-
__decorate([
|
|
647
|
-
(0, test_utils_1.test)()
|
|
648
|
-
], CliCommandRunnerTest, "createPackageRunsNpmAutopackage", null);
|
|
649
|
-
__decorate([
|
|
650
|
-
(0, test_utils_1.test)()
|
|
651
|
-
], CliCommandRunnerTest, "createUiCreatesInstance", null);
|
|
652
|
-
__decorate([
|
|
653
|
-
(0, test_utils_1.test)()
|
|
654
|
-
], CliCommandRunnerTest, "createUiPromptsInstallDependenciesIfMissing", null);
|
|
655
|
-
__decorate([
|
|
656
|
-
(0, test_utils_1.test)()
|
|
657
|
-
], CliCommandRunnerTest, "createUiInstallsDependenciesIfMissing", null);
|
|
658
|
-
__decorate([
|
|
659
|
-
(0, test_utils_1.test)()
|
|
660
|
-
], CliCommandRunnerTest, "createUiInstallsDevDependenciesIfMissing", null);
|
|
661
|
-
__decorate([
|
|
662
|
-
(0, test_utils_1.test)()
|
|
663
|
-
], CliCommandRunnerTest, "createUiInstallsIfAnyDepIsMissing", null);
|
|
664
|
-
__decorate([
|
|
665
|
-
(0, test_utils_1.test)()
|
|
666
|
-
], CliCommandRunnerTest, "createUiUpdatesTsconfigIfDepsWereMissing", null);
|
|
667
|
-
__decorate([
|
|
668
|
-
(0, test_utils_1.test)()
|
|
669
|
-
], CliCommandRunnerTest, "createUiCreatesSetupTestsIfDepsWereMissing", null);
|
|
670
|
-
__decorate([
|
|
671
|
-
(0, test_utils_1.test)()
|
|
672
|
-
], CliCommandRunnerTest, "createUiAddsSetupTestsToPackageJsonIfDepsWereMissing", null);
|
|
673
|
-
__decorate([
|
|
674
|
-
(0, test_utils_1.test)()
|
|
675
|
-
], CliCommandRunnerTest, "createUiRecompilesTypescriptIfDepsWereMissing", null);
|
|
676
|
-
__decorate([
|
|
677
|
-
(0, test_utils_1.test)()
|
|
678
|
-
], CliCommandRunnerTest, "createUiDoesNotPromptIfDependenciesAreInstalled", null);
|
|
679
|
-
__decorate([
|
|
680
|
-
(0, test_utils_1.test)()
|
|
681
|
-
], CliCommandRunnerTest, "createUiPromptsUserForInput", null);
|
|
682
|
-
__decorate([
|
|
683
|
-
(0, test_utils_1.test)()
|
|
684
|
-
], CliCommandRunnerTest, "createUiDoesNotContinueIfPromptsIsInterrupted", null);
|
|
685
|
-
__decorate([
|
|
686
|
-
(0, test_utils_1.test)()
|
|
687
|
-
], CliCommandRunnerTest, "createUiCreatesTestSaveDirIfNotExists", null);
|
|
688
|
-
__decorate([
|
|
689
|
-
(0, test_utils_1.test)()
|
|
690
|
-
], CliCommandRunnerTest, "createUiCreatesModuleSaveDirIfNotExists", null);
|
|
691
|
-
__decorate([
|
|
692
|
-
(0, test_utils_1.test)()
|
|
693
|
-
], CliCommandRunnerTest, "createUiCreatesFakeSaveDirIfNotExists", null);
|
|
694
|
-
__decorate([
|
|
695
|
-
(0, test_utils_1.test)()
|
|
696
|
-
], CliCommandRunnerTest, "createUiCreatesUiAutomodule", null);
|
|
697
|
-
__decorate([
|
|
698
|
-
(0, test_utils_1.test)()
|
|
699
|
-
], CliCommandRunnerTest, "createUiRunsUiAutomodule", null);
|
|
700
45
|
__decorate([
|
|
701
46
|
(0, test_utils_1.test)()
|
|
702
47
|
], CliCommandRunnerTest, "helpOutputsHelpTextToConsole", null);
|
|
@@ -706,22 +51,4 @@ __decorate([
|
|
|
706
51
|
__decorate([
|
|
707
52
|
(0, test_utils_1.test)()
|
|
708
53
|
], CliCommandRunnerTest, "helpAcceptsDashHFlag", null);
|
|
709
|
-
__decorate([
|
|
710
|
-
(0, test_utils_1.test)()
|
|
711
|
-
], CliCommandRunnerTest, "upgradePackageCreatesInstance", null);
|
|
712
|
-
__decorate([
|
|
713
|
-
(0, test_utils_1.test)()
|
|
714
|
-
], CliCommandRunnerTest, "upgradePackageCreatesNpmAutopackage", null);
|
|
715
|
-
__decorate([
|
|
716
|
-
(0, test_utils_1.test)()
|
|
717
|
-
], CliCommandRunnerTest, "upgradePackageRunsNpmAutopackage", null);
|
|
718
|
-
__decorate([
|
|
719
|
-
(0, test_utils_1.test)()
|
|
720
|
-
], CliCommandRunnerTest, "upgradePackageAddsDefaultKeywordsIfMissing", null);
|
|
721
|
-
__decorate([
|
|
722
|
-
(0, test_utils_1.test)()
|
|
723
|
-
], CliCommandRunnerTest, "upgradePackageDoesNotOverwriteKeywordsEvenIfDefaultsMissing", null);
|
|
724
|
-
__decorate([
|
|
725
|
-
(0, test_utils_1.test)()
|
|
726
|
-
], CliCommandRunnerTest, "upgradePackageExtractsPackageNameFromScopedName", null);
|
|
727
54
|
//# sourceMappingURL=CliCommandRunner.test.js.map
|