mirror of
https://github.com/github/codeql-action.git
synced 2026-10-31 09:59:43 +00:00
Add and use __CODEQL_ACTION_TEST_ENV__ in tests
This commit is contained in:
@@ -184,12 +184,6 @@ export function makeMacro<Args extends unknown[]>(
|
||||
}
|
||||
|
||||
export function getTestEnv(testEnv: NodeJS.ProcessEnv = {}): Env {
|
||||
// In unit tests run by `ava`, this environment variable is set for the process,
|
||||
// but we default to an empty environment here for `testEnv`, so we must set it
|
||||
// explicitly to ensure that we get test-specific behaviour in functions when
|
||||
// we need it.
|
||||
testEnv["NODE_ENV"] = "test";
|
||||
|
||||
return getEnv(testEnv);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user