From 2d4b7cb12e06da8256edd4c606f6d93014cec701 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 10 Oct 2018 18:35:03 -0700 Subject: [PATCH] Move strict null checks from precomit to test These checks are now taking a few seconds to run. This will continue to slow down as we null check more files. Moving them to the test scripts as pretest checks instead --- package.json | 2 +- scripts/test.bat | 3 +++ scripts/test.sh | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index ad3585d88fc..a774aa412a0 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "watch": "gulp watch --max_old_space_size=4095", "watch-client": "gulp watch-client --max_old_space_size=4095", "monaco-editor-test": "mocha --only-monaco-editor", - "precommit": "node build/gulpfile.hygiene.js && npm run strict-null-check", + "precommit": "node build/gulpfile.hygiene.js", "gulp": "gulp --max_old_space_size=4095", "7z": "7z", "update-grammars": "node build/npm/update-all-grammars.js", diff --git a/scripts/test.bat b/scripts/test.bat index 7f5f5f8df8e..20c7cb81f2f 100644 --- a/scripts/test.bat +++ b/scripts/test.bat @@ -15,6 +15,9 @@ set CODE=".build\electron\%NAMESHORT%" node build\lib\electron.js if %errorlevel% neq 0 node .\node_modules\gulp\bin\gulp.js electron +:: Pretest +yarn strict-null-check + :: Run tests %CODE% .\test\electron\index.js %* diff --git a/scripts/test.sh b/scripts/test.sh index ac96627846f..58fbf605784 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -28,6 +28,9 @@ test -d node_modules || yarn # Get electron node build/lib/electron.js || ./node_modules/.bin/gulp electron +# Pretest +yarn strict-null-check + # Unit Tests if [[ "$OSTYPE" == "darwin"* ]]; then cd $ROOT ; ulimit -n 4096 ; \