@adonisjs/env 3.0.8 → 3.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -38,12 +38,16 @@ function envLoader(appRoot) {
38
38
  const absPath = (0, path_1.isAbsolute)(envPath) ? envPath : (0, path_1.join)(appRoot, envPath);
39
39
  const envContents = loadFile(absPath, true);
40
40
  /**
41
- * Optionally loading the `.env.testing` file in test environment
41
+ * Optionally load the `.env.test` and `.env.testing` files
42
+ * in test environment
42
43
  */
43
44
  let testEnvContent = '';
44
45
  if (process.env.NODE_ENV === 'testing') {
45
46
  testEnvContent = loadFile((0, path_1.join)(appRoot, '.env.testing'), true);
46
47
  }
48
+ else if (process.env.NODE_ENV === 'test') {
49
+ testEnvContent = loadFile((0, path_1.join)(appRoot, '.env.test'), true);
50
+ }
47
51
  return { testEnvContent, envContents };
48
52
  }
49
53
  exports.envLoader = envLoader;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adonisjs/env",
3
- "version": "3.0.8",
3
+ "version": "3.0.9",
4
4
  "description": "Environment variable manager for Node.js",
5
5
  "main": "build/index.js",
6
6
  "files": [