codify-plugin-test 0.0.47 → 0.0.48

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codify-plugin-test",
3
- "version": "0.0.47",
3
+ "version": "0.0.48",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -16,6 +16,7 @@ export class PluginTester {
16
16
  configs: ResourceConfig[],
17
17
  options?: {
18
18
  skipUninstall?: boolean,
19
+ skipImport?: boolean,
19
20
  validatePlan?: (plans: PlanResponseData[]) => Promise<void> | void
20
21
  validateApply?: (plans: PlanResponseData[]) => Promise<void> | void,
21
22
  validateDestroy?: (plans: PlanResponseData[]) => Promise<void> | void,
@@ -87,23 +88,25 @@ export class PluginTester {
87
88
  plugin.kill();
88
89
  }
89
90
 
90
- const importPlugin = new PluginProcess(pluginPath);
91
- try {
92
- console.info(chalk.cyan('Testing import...'))
91
+ if (!options?.skipImport) {
92
+ const importPlugin = new PluginProcess(pluginPath);
93
+ try {
94
+ console.info(chalk.cyan('Testing import...'))
93
95
 
94
- const importResults = [];
95
- for (const config of configs) {
96
- const { coreParameters, parameters } = splitUserConfig(config);
97
-
98
- const importResult = await importPlugin.import({ core: coreParameters, parameters })
99
- importResults.push(importResult);
100
- }
96
+ const importResults = [];
97
+ for (const config of configs) {
98
+ const { coreParameters, parameters } = splitUserConfig(config);
99
+
100
+ const importResult = await importPlugin.import({ core: coreParameters, parameters })
101
+ importResults.push(importResult);
102
+ }
101
103
 
102
- if (options?.validateImport) {
103
- await options.validateImport(importResults.map((r) => r.result[0]));
104
+ if (options?.validateImport) {
105
+ await options.validateImport(importResults.map((r) => r.result[0]));
106
+ }
107
+ } finally {
108
+ importPlugin.kill();
104
109
  }
105
- } finally {
106
- importPlugin.kill();
107
110
  }
108
111
 
109
112
  if (options?.testModify) {