@rophy123/helmtest 2.1.3 → 2.1.4

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.
Files changed (2) hide show
  1. package/lib/helmtest.js +5 -4
  2. package/package.json +1 -1
package/lib/helmtest.js CHANGED
@@ -21,9 +21,10 @@ async function renderTemplate(options = {}) {
21
21
  options.templateFiles = options.templateFiles || [];
22
22
  options.extraHelmArgs = options.extraHelmArgs || [];
23
23
  options.helmBinary = options.helmBinary || process.env.HELM_BINARY || 'helm';
24
- options.loadYaml = options.loadYaml || true;
25
- options.kubeconformEnabled = options.kubeconformEnabled ||
26
- process.env.KUBECONFORM_ENABLED || false;
24
+ if (options.loadYaml === undefined) options.loadYaml = true;
25
+ if (options.kubeconformEnabled === undefined) {
26
+ options.kubeconformEnabled = process.env.KUBECONFORM_ENABLED || false;
27
+ }
27
28
  options.kubeconformBinary = options.kubeconformBinary ||
28
29
  process.env.KUBECONFORM_BINARY || 'kubeconform';
29
30
  options.kubeconformArgs = options.kubeconformArgs ||
@@ -103,7 +104,7 @@ async function renderTemplate(options = {}) {
103
104
  if (options.loadYaml) {
104
105
  return yaml.loadAll(helmOutput.stdout);
105
106
  } else {
106
- return helmOutput;
107
+ return helmOutput.stdout;
107
108
  }
108
109
  }
109
110
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rophy123/helmtest",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
4
4
  "description": "Write unit tests against your helm charts using JavaScript.",
5
5
  "main": "index.js",
6
6
  "bin": {