1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00
metamask-extension/test/test-unit-combined.sh
Erik Marks 822ce5b8b0
Fix unit test package scripts (#12278)
This PR fixes our local unit test package scripts. When the state migration unit tests were migrated to Jest in #12106, it left the `test:unit` script in a broken state, because it didn't tell `mocha` to ignore the state migration tests.

Arguably, that script was already broken, since the most reasonably expectation from its name is that it runs _all_ unit tests. The PR makes it so that it does just that, by means of `concurrently`.

Unfortunately, `concurrently` only outputs errors from child processes once (at the time when they exit, https://github.com/open-cli-tools/concurrently/issues/134). This means that we have to search/navigate the output for this combined script to identify the failure. That said, it's better than the status quo.
2021-10-06 07:35:23 -07:00

12 lines
180 B
Bash
Executable File

#!/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"