From ddc71e5d59ab6e8306581f3789ff27e7180f9477 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 5 Apr 2022 14:32:41 -0500 Subject: [PATCH] Add cross-env again, so `yarn test` actually works without environment variables --- package.json | 3 ++- yarn.lock | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 44f6f08d2..517ff0761 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "build": "npx webpack", "jsdoc": "npx jsdoc -c jsdoc.conf.js", "manage:translations": "node ./webpack/translationRunner.js", - "test": "npx jest", + "test": "npx cross-env NODE_ENV=test npx jest", "test:coverage": "npx jest --coverage", "test:all": "${npm_execpath} run test:coverage && ${npm_execpath} run lint", "lint": "${npm_execpath} run lint:js && ${npm_execpath} run lint:sass", @@ -200,6 +200,7 @@ "@typescript-eslint/parser": "^5.15.0", "babel-eslint": "^10.1.0", "babel-jest": "^27.5.1", + "cross-env": "^7.0.3", "eslint": "^7.0.0", "eslint-plugin-import": "^2.25.4", "eslint-plugin-jsx-a11y": "^6.4.1", diff --git a/yarn.lock b/yarn.lock index 79eab169e..ca2fc244d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3729,7 +3729,14 @@ cosmiconfig@^7.0.0, cosmiconfig@^7.0.1: path-type "^4.0.0" yaml "^1.10.0" -cross-spawn@^7.0.2, cross-spawn@^7.0.3: +cross-env@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf" + integrity sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw== + dependencies: + cross-spawn "^7.0.1" + +cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==