@oclif/test
Advanced tools
Comparing version 4.0.10 to 4.1.0
@@ -5,2 +5,3 @@ import { Errors, Interfaces } from '@oclif/core'; | ||
stripAnsi?: boolean; | ||
testNodeEnv?: string; | ||
}; | ||
@@ -7,0 +8,0 @@ type CaptureResult<T> = { |
@@ -62,2 +62,3 @@ "use strict"; | ||
const stripAnsi = opts?.stripAnsi ?? true; | ||
const testNodeEnv = opts?.testNodeEnv || 'test'; | ||
const originals = { | ||
@@ -90,3 +91,3 @@ NODE_ENV: process.env.NODE_ENV, | ||
process.stderr.write = mock('stderr'); | ||
process.env.NODE_ENV = 'test'; | ||
process.env.NODE_ENV = testNodeEnv; | ||
try { | ||
@@ -93,0 +94,0 @@ const result = await fn(); |
{ | ||
"name": "@oclif/test", | ||
"description": "test helpers for oclif components", | ||
"version": "4.0.10", | ||
"version": "4.1.0", | ||
"author": "Salesforce", | ||
@@ -6,0 +6,0 @@ "bugs": "https://github.com/oclif/test/issues", |
@@ -27,2 +27,3 @@ # @oclif/test | ||
- `stripAnsi` - Strip ansi codes from everything that goes to stdout and stderr. Defaults to true. | ||
- `testNodeEnv` - Sets the `NODE_ENV` value when capturing output. Defaults to `'test'`. | ||
@@ -29,0 +30,0 @@ See the [tests](./test/capture-output.test.ts) for example usage. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13246
211
42