diff --git a/package.json b/package.json index 162649c83..887b99329 100644 --- a/package.json +++ b/package.json @@ -24,9 +24,10 @@ "dapp-chain": "GANACHE_ARGS='-b 2' concurrently -k -n ganache,dapp -p '[{time}][{name}]' 'yarn ganache:start' 'sleep 5 && yarn dapp'", "forwarder": "node ./development/static-server.js ./node_modules/@metamask/forwarder/dist/ --port 9010", "dapp-forwarder": "concurrently -k -n forwarder,dapp -p '[{time}][{name}]' 'yarn forwarder' 'yarn dapp'", - "test:unit": "mocha --exit --require test/env.js --require test/setup.js --recursive './app/**/*.test.js'", + "test:unit": "./test/test-unit-combined.sh", + "test:unit:jest": "./test/test-unit-jest.sh", "test:unit:global": "mocha --exit --require test/env.js --require test/setup.js --recursive test/unit-global/*.test.js", - "test:unit:jest": "./test/run-jest.sh", + "test:unit:mocha": "mocha --exit --require test/env.js --require test/setup.js --ignore './app/scripts/migrations/*.test.js' --recursive './app/**/*.test.js'", "test:unit:lax": "mocha --exit --require test/env.js --require test/setup.js --ignore './app/scripts/controllers/permissions/*.test.js' --ignore './app/scripts/migrations/*.test.js' --recursive './app/**/*.test.js'", "test:unit:strict": "mocha --exit --require test/env.js --require test/setup.js --recursive './app/scripts/controllers/permissions/*.test.js'", "test:unit:path": "mocha --exit --require test/env.js --require test/setup.js --recursive", diff --git a/test/test-unit-combined.sh b/test/test-unit-combined.sh new file mode 100755 index 000000000..d793ba752 --- /dev/null +++ b/test/test-unit-combined.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +set -x +set -e +set -u +set -o pipefail + +concurrently --raw -n mocha,jest,global \ + "yarn test:unit:mocha" \ + "yarn test:unit:jest" \ + "yarn test:unit:global" diff --git a/test/run-jest.sh b/test/test-unit-jest.sh similarity index 78% rename from test/run-jest.sh rename to test/test-unit-jest.sh index 40b208732..384124920 100755 --- a/test/run-jest.sh +++ b/test/test-unit-jest.sh @@ -5,6 +5,6 @@ set -e set -u set -o pipefail -concurrently \ +concurrently -n production,development \ "jest --config=./jest.config.js $*" \ "jest --config=./development/jest.config.js $*"