diff --git a/NodeApp/.gitlab-ci/01_functions.yml b/NodeApp/.gitlab-ci/01_functions.yml
index 8bef56b85465b295047de09885845f7b6288f8bc..b2c4f6185cde7e8074ef4c4c04f4798600f8e148 100644
--- a/NodeApp/.gitlab-ci/01_functions.yml
+++ b/NodeApp/.gitlab-ci/01_functions.yml
@@ -78,7 +78,7 @@
 
         # Decrypt env vars for production
         - |
-            if [ $CI_COMMIT_REF_PROTECTED == "true" ]; then
+            if [ $CI_COMMIT_REF_PROTECTED == "true" || $IS_TEST == true ]; then
                 echo "Decrypt production env vars"
                 sed -i -r "s/(DOTENV_KEY[ ]*:[ ]*[\'\"\`])[^'\"\`]*([\'\"\`])([ ]*\,)?//g" src/app.ts
                 sed -i -r "s/,[\ \n]*\}/\}/g" src/app.ts