@salesforce/cli-plugins-testkit 2.2.0 → 2.3.0

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/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [2.3.0](https://github.com/salesforcecli/cli-plugins-testkit/compare/v2.2.0...v2.3.0) (2022-06-08)
6
+
7
+ ### Features
8
+
9
+ - raw exec output when stdout/stderr are empty ([b93e8bc](https://github.com/salesforcecli/cli-plugins-testkit/commit/b93e8bcc0e0d926a3956350e648f4a8d886933e1))
10
+
5
11
  ## [2.2.0](https://github.com/salesforcecli/cli-plugins-testkit/compare/v2.1.4...v2.2.0) (2022-06-08)
6
12
 
7
13
  ### Features
package/lib/execCmd.js CHANGED
@@ -47,8 +47,12 @@ const addJsonOutput = (cmd, result) => {
47
47
  return result;
48
48
  };
49
49
  const getExitCodeError = (cmd, expectedCode, output) => {
50
- const errorDetails = `\nstdout=${output.stdout}\nstderr=${output.stderr}`;
51
- return Error(`Unexpected exit code for command: ${cmd}. Expected: ${expectedCode} Actual: ${output.code}${errorDetails}`);
50
+ const errorDetails = output.stdout || output.stderr
51
+ ? // return details if they exist
52
+ `\nstdout=${output.stdout}\nstderr=${output.stderr}`
53
+ : // or the raw string if there are no details
54
+ `\n${output}`;
55
+ return Error(`Unexpected exit code for command: ${cmd}. Expected: ${expectedCode} Actual: ${output.code} ${errorDetails}`);
52
56
  };
53
57
  /**
54
58
  * Build a command string using an optional executable path for use by `execCmd`.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@salesforce/cli-plugins-testkit",
3
3
  "description": "Provides test utilities to assist Salesforce CLI plug-in authors with writing non-unit tests (NUT).",
4
- "version": "2.2.0",
4
+ "version": "2.3.0",
5
5
  "author": "Salesforce",
6
6
  "license": "BSD-3-Clause",
7
7
  "main": "lib/index.js",