From 70a9f29536fe527a87fb4c12f19377c0979e5977 Mon Sep 17 00:00:00 2001 From: Alexis G Date: Thu, 11 Jan 2024 18:14:04 +0100 Subject: [PATCH] feat: Force NODE_ENV to "test" when run it If your application uses cozy-scripts to run tests, you can remove `env NODE_ENV=test` from your script --- packages/cozy-scripts/scripts/test.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/cozy-scripts/scripts/test.js b/packages/cozy-scripts/scripts/test.js index 652ef31e5..93ab486da 100644 --- a/packages/cozy-scripts/scripts/test.js +++ b/packages/cozy-scripts/scripts/test.js @@ -3,6 +3,7 @@ const jestAPI = require('jest') function runJest(options) { + if (!process.env.NODE_ENV) process.env.NODE_ENV = 'test' const { cliArgs } = options jestAPI.run(cliArgs)