From 97580708840780fba032fe7b8c2ac8b951e50439 Mon Sep 17 00:00:00 2001 From: Katrina Uychaco Date: Wed, 1 May 2019 15:45:26 -0700 Subject: [PATCH] Add `NODE_ENV=development` to `test` script to see React errors React runs fewer checks in production mode for efficiency. For example, in development mode it checks that props have not been mutated. We had an issue where tests were failing on CI due to mutated props but not locally until we set the NODE_ENV to be development. Let's just have this always be the case to err on the side of catching more errors locally. Co-Authored-By: Ash Wilson --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9841f36cd5..b53342b533 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "repository": "https://github.com/atom/github", "license": "MIT", "scripts": { - "test": "cross-env-shell \"${ATOM_SCRIPT_PATH:-atom} --test test\"", + "test": "cross-env-shell NODE_ENV=development \"${ATOM_SCRIPT_PATH:-atom} --test test\"", "test:coverage": "cross-env ATOM_GITHUB_BABEL_ENV=coverage npm run test", "test:coverage:text": "nyc --reporter=text npm run test:coverage", "test:coverage:html": "nyc --reporter=html npm run test:coverage",