diff --git a/packages/shared-lib-node/src/env.ts b/packages/shared-lib-node/src/env.ts index 326d3102..70eca3a2 100644 --- a/packages/shared-lib-node/src/env.ts +++ b/packages/shared-lib-node/src/env.ts @@ -22,13 +22,11 @@ export const yargsOptionsBuilderForEnv = { type: 'string', }, 'cascade-node-env': { - description: - 'Same with --cascade-env=. If NODE_ENV is falsy, "development" is applied. Preferred over `auto-cascade-env`.', + description: 'Same with --cascade-env=. Preferred over `auto-cascade-env`.', type: 'boolean', }, 'auto-cascade-env': { - description: - 'Same with --cascade-env=. If they are falsy, "development" is applied.', + description: 'Same with --cascade-env=.', type: 'boolean', default: true, }, diff --git a/packages/wb/src/index.ts b/packages/wb/src/index.ts index 90491a82..6bee65e8 100644 --- a/packages/wb/src/index.ts +++ b/packages/wb/src/index.ts @@ -28,7 +28,11 @@ await yargs(hideBin(process.argv)) removeNpmAndYarnEnvironmentVariables(process.env); - if (['tc', 'typecheck'].includes(argv._[0].toString())) return; + const command = argv._[0].toString(); + if (['tc', 'typecheck'].includes(command)) return; + if (command === 'test') { + process.env.WB_ENV = process.env.WB_ENV || 'test'; + } loadEnvironmentVariables(argv, project.dirPath); }) .command(buildIfNeededCommand)