2023-02-22 14:04:16 +01:00
|
|
|
#!/bin/bash
|
2023-03-31 11:32:13 +02:00
|
|
|
set -e
|
2023-02-22 14:04:16 +01:00
|
|
|
|
|
|
|
if [[ -n $CI ]]
|
|
|
|
then
|
2024-04-03 12:55:38 +02:00
|
|
|
export NODE_OPTIONS="--max-old-space-size=4096 --no-node-snapshot $NODE_OPTIONS"
|
|
|
|
echo "jest --coverage --maxWorkers=4 --forceExit --workerIdleMemoryLimit=2000MB --bail $@"
|
|
|
|
jest --coverage --maxWorkers=4 --forceExit --workerIdleMemoryLimit=2000MB --bail $@
|
2023-02-22 14:04:16 +01:00
|
|
|
else
|
2024-04-03 12:55:38 +02:00
|
|
|
# --maxWorkers performs better in development
|
|
|
|
export NODE_OPTIONS="--no-node-snapshot $NODE_OPTIONS"
|
2024-01-30 11:23:11 +01:00
|
|
|
echo "jest --coverage --maxWorkers=2 --forceExit $@"
|
|
|
|
jest --coverage --maxWorkers=2 --forceExit $@
|
2023-02-22 14:04:16 +01:00
|
|
|
fi
|