mirror of
https://github.com/swc-project/swc.git
synced 2024-12-24 14:16:12 +03:00
test(es/minifier): Organize tests (#4375)
This commit is contained in:
parent
d87bc6e595
commit
4a8b1dad1d
@ -40,7 +40,7 @@ if [[ $REDUCED_SIZE -le 3 ]]; then
|
||||
(cd $dir && git commit -m "Remove a file as it didn't break anything" $1)
|
||||
else
|
||||
cat $wd/input.js
|
||||
# mkdir -p "$SCRIPT_DIR/../tests/compress/fixture/reduced/$hash"
|
||||
# cp "$wd/input.js" "$SCRIPT_DIR/../tests/compress/fixture/reduced/$hash/input.js"
|
||||
# mkdir -p "$SCRIPT_DIR/../tests/fixture/reduced/$hash"
|
||||
# cp "$wd/input.js" "$SCRIPT_DIR/../tests/fixture/reduced/$hash/input.js"
|
||||
./scripts/_/notify.sh "Found errornous input"
|
||||
fi
|
||||
|
@ -29,4 +29,4 @@ UPDATE=1 ./scripts/base.sh base_fixture
|
||||
./scripts/base.sh base_exec
|
||||
|
||||
SKIP_GOLDEN=1 cargo test --test compress --all-features ${1:-fixture_tests__terser__compress__}
|
||||
SKIP_GOLDEN=1 UPDATE=1 cargo test --test compress --all-features ${1:-fixture_tests__compress__}
|
||||
SKIP_GOLDEN=1 UPDATE=1 cargo test --test compress --all-features ${1:-fixture_tests__fixture__}
|
||||
|
@ -10,7 +10,7 @@ use testing::NormalizedOutput;
|
||||
use super::VarUsageInfo;
|
||||
use crate::marks::Marks;
|
||||
|
||||
#[testing::fixture("tests/compress/fixture/**/input.js")]
|
||||
#[testing::fixture("tests/fixture/**/input.js")]
|
||||
#[testing::fixture("tests/single-pass/**/input.js")]
|
||||
#[testing::fixture("tests/terser/compress/**/input.js")]
|
||||
fn snapshot(input: PathBuf) {
|
||||
|
@ -2053,6 +2053,7 @@ where
|
||||
n.visit_mut_children_with(&mut *self.with_ctx(ctx));
|
||||
|
||||
if self.label.is_none() {
|
||||
report_change!("Removing label `{}`", n.label);
|
||||
n.label.take();
|
||||
}
|
||||
|
||||
|
@ -279,7 +279,7 @@ fn find_config(dir: &Path) -> String {
|
||||
panic!("failed to find config file for {}", dir.display())
|
||||
}
|
||||
|
||||
#[testing::fixture("tests/compress/fixture/**/input.js")]
|
||||
#[testing::fixture("tests/fixture/**/input.js")]
|
||||
#[testing::fixture("tests/single-pass/**/input.js")]
|
||||
fn custom_fixture(input: PathBuf) {
|
||||
let dir = input.parent().unwrap();
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user