swc/ecmascript/minifier/scripts/run.sh
강동윤 d20c1d3089
feat(es/minifier): Implement more rules (#1717)
swc_ecma_minifier:
 - Implement `global-defs` pass.
 - Implement `properties` pass partially.
2021-05-21 15:57:17 +09:00

23 lines
530 B
Bash
Executable File

#!/usr/bin/env bash
#
# This script exists to prevent regression.
#
# This script invoked tests two time.
# For first, it runs tests in no-regression mode.
# In the mode, only tests listed in tests/golden.txt will be tested.
#
# For second invokation, arguments are passed to cargo test so the user can
# filter tests.
#
set -eu
if [ -z "$@" ]; then
./scripts/sort.sh
export RUST_LOG=swc_ecma_minifier=trace
GOLDEN_ONLY=1 cargo test --test compress --all-features
fi
cargo test --test compress --all-features $@