From 0dacdabd3004ee52eb09aa3ab40336f3743db995 Mon Sep 17 00:00:00 2001 From: Stefanos Togkoulidis Date: Thu, 5 Jul 2018 16:03:21 +0300 Subject: [PATCH] .babelrc hack needs content for the tests only --- package.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ee73b9a2dc..900335724b 100644 --- a/package.json +++ b/package.json @@ -37,14 +37,16 @@ }, "scripts": { "check-gb-unused-babelrc": "cd gutenberg/; git ls-files --error-unmatch .babelrc 2>/dev/null; tracked=$?; cd ..; (if [ \"$tracked\" -gt 0 ]; then (exit 0); else (echo \"'.babelrc' is tracked in Gutenberg, cannot overwrite!\"; exit 1); fi)", - "bypass-gb-babel": "echo '{\"presets\": [\"@wordpress/default\"]}' > gutenberg/.babelrc", + "bypass-gb-babel": "echo '{}' > gutenberg/.babelrc", + "test:bypass-gb-babel": "echo '{\"presets\": [\"@wordpress/default\"]}' > gutenberg/.babelrc", "pre-build": "yarn check-gb-unused-babelrc && yarn bypass-gb-babel", + "test:pre-build": "yarn check-gb-unused-babelrc && yarn test:bypass-gb-babel", "start": "yarn pre-build && yarn react-native start", "start:reset": "yarn clean:runtime && yarn start --reset-cache", "start:debug": "yarn pre-build && node --inspect-brk node_modules/.bin/react-native start", "android": "react-native run-android", "ios": "react-native run-ios", - "test": "yarn pre-build && cross-env NODE_ENV=test node node_modules/jest/bin/jest.js --verbose --config jest.config.js", + "test": "yarn test:pre-build && cross-env NODE_ENV=test node node_modules/jest/bin/jest.js --verbose --config jest.config.js", "test:debug": "yarn pre-build && cross-env NODE_ENV=test node --inspect-brk node_modules/jest/bin/jest.js --runInBand --verbose --config jest.config.js", "flow": "flow", "prettier": "prettier-eslint --write $npm_package_config_jsfiles $npm_package_config_scssfiles",