test(es/minifier): Organize tests (#4375)

This commit is contained in:
Donny/강동윤 2022-04-20 15:52:03 +09:00 committed by GitHub
parent d87bc6e595
commit 4a8b1dad1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
857 changed files with 7 additions and 6 deletions

View File

@ -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

View File

@ -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__}

View File

@ -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) {

View File

@ -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();
}

View File

@ -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