From 2747bb64ab07fa1804af3ffe5e09a3909a61a06c Mon Sep 17 00:00:00 2001 From: Liang Date: Tue, 20 Oct 2026 21:24:34 +0800 Subject: [PATCH 1/6] test(pm): un-ignore sha1/sha224 hash tests and assert retry count --- crates/vp_pm_cli/src/request.rs | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/crates/vp_pm_cli/src/request.rs b/crates/vp_pm_cli/src/request.rs index ff21f42134..0d690fe8e4 100644 --- a/crates/vp_pm_cli/src/request.rs +++ b/crates/vp_pm_cli/src/request.rs @@ -1229,7 +1229,7 @@ mod tests { let temp_dir = TempDir::new().unwrap(); let target_file = temp_dir.path().join("test.txt"); - server.mock(|when, then| { + let mock = server.mock(|when, then| { when.method(GET).path("/server_error"); then.status(500).body("Internal Server Error"); }); @@ -1239,8 +1239,10 @@ mod tests { // Should fail after retries let result = client.download_file(&url, &target_file, None).await; - // println!("result: {:?}", result); assert!(result.is_err(), "Expected download to fail with 500 after retries"); + + // Should try 3 times, 1 for first request, 2 for retries + mock.assert_hits(3); } #[tokio::test] @@ -1409,7 +1411,6 @@ mod tests { } #[tokio::test] - #[ignore] // Flaky on musl/Alpine — temp file race condition async fn test_verify_file_hash_sha1() { use sha1::Sha1; use sha2::Digest; @@ -1422,6 +1423,8 @@ mod tests { let content = b"Hello, World!"; let mut file = tokio::fs::File::create(&test_file).await.unwrap(); file.write_all(content).await.unwrap(); + // Finish the background write before hashing through another file handle. + file.flush().await.unwrap(); // Calculate expected SHA1 let mut hasher = Sha1::new(); @@ -1430,12 +1433,12 @@ mod tests { // Test successful verification let result = verify_file_hash(&test_file, &expected_hash).await; - assert!(result.is_ok()); + assert!(result.is_ok(), "{result:?}"); // Test failed verification let wrong_hash = "sha1.0000000000000000000000000000000000000000"; let result = verify_file_hash(&test_file, wrong_hash).await; - assert!(result.is_err()); + assert!(matches!(result, Err(Error::HashMismatch { .. })), "{result:?}"); } #[tokio::test] @@ -1470,7 +1473,6 @@ mod tests { } #[tokio::test] - #[ignore] // Flaky on musl/Alpine — temp file race condition async fn test_verify_file_hash_sha224() { use sha2::{Digest, Sha224}; use tokio::io::AsyncWriteExt; @@ -1482,6 +1484,8 @@ mod tests { let content = b"Test content for SHA224"; let mut file = tokio::fs::File::create(&test_file).await.unwrap(); file.write_all(content).await.unwrap(); + // Finish the background write before hashing through another file handle. + file.flush().await.unwrap(); // Calculate expected SHA224 let mut hasher = Sha224::new(); @@ -1490,12 +1494,12 @@ mod tests { // Test successful verification let result = verify_file_hash(&test_file, &expected_hash).await; - assert!(result.is_ok()); + assert!(result.is_ok(), "{result:?}"); // Test failed verification let wrong_hash = "sha224.00000000000000000000000000000000000000000000000000000000"; let result = verify_file_hash(&test_file, wrong_hash).await; - assert!(result.is_err()); + assert!(matches!(result, Err(Error::HashMismatch { .. })), "{result:?}"); } #[tokio::test] From d672ebca1170bb96318b20626544742713b480bc Mon Sep 17 00:00:00 2001 From: Liang Date: Tue, 20 Oct 2026 21:24:34 +0800 Subject: [PATCH 2/6] test: remove duplicate and production-free Rust unit tests --- crates/vp_migration/src/import_rewriter.rs | 60 ------------------- .../vp_pm_cli/src/resolution/commands/link.rs | 39 ------------ .../vp_pm_cli/src/resolution/commands/ping.rs | 9 --- .../src/resolution/commands/unlink.rs | 14 ----- crates/vp_setup/src/registry.rs | 50 ---------------- crates/vp_static_config/src/lib.rs | 18 ------ 6 files changed, 190 deletions(-) diff --git a/crates/vp_migration/src/import_rewriter.rs b/crates/vp_migration/src/import_rewriter.rs index f731e937a2..fd272760b5 100644 --- a/crates/vp_migration/src/import_rewriter.rs +++ b/crates/vp_migration/src/import_rewriter.rs @@ -2878,26 +2878,6 @@ mod tests { assert!(rewrite_imports_in_directory(temp.path()).unwrap().modified_files.is_empty()); } - #[test] - fn test_rewrite_import_content_vite() { - let vite_config = r#"import { defineConfig } from 'vite' - -export default defineConfig({ - plugins: [], -});"#; - - let result = rewrite_import_content(vite_config, &SkipPackages::default()).unwrap(); - assert!(result.updated); - assert_eq!( - result.content, - r#"import { defineConfig } from 'vite-plus' - -export default defineConfig({ - plugins: [], -});"# - ); - } - #[test] fn test_rewrite_import_content_vite_double_quotes() { let vite_config = r#"import { defineConfig } from "vite"; @@ -5607,14 +5587,6 @@ const { defineConfig } = require('vite-plus');"# // Reference Types Rewriting Tests // ==================================== - #[test] - fn test_rewrite_reference_types_vite_client() { - let content = r#"/// "#; - let result = rewrite_import_content(content, &SkipPackages::default()).unwrap(); - assert!(result.updated); - assert_eq!(result.content, r#"/// "#); - } - #[test] fn test_rewrite_reference_types_vite_client_single_quotes() { let content = r#"/// "#; @@ -5631,30 +5603,6 @@ const { defineConfig } = require('vite-plus');"# assert_eq!(result.content, r#"/// "#); } - #[test] - fn test_rewrite_reference_types_bare_vitest() { - let content = r#"/// "#; - let result = rewrite_import_content(content, &SkipPackages::default()).unwrap(); - assert!(result.updated); - assert_eq!(result.content, r#"/// "#); - } - - #[test] - fn test_rewrite_reference_types_vitest_globals() { - let content = r#"/// "#; - let result = rewrite_import_content(content, &SkipPackages::default()).unwrap(); - assert!(result.updated); - assert_eq!(result.content, r#"/// "#); - } - - #[test] - fn test_rewrite_reference_types_vitest_config() { - let content = r#"/// "#; - let result = rewrite_import_content(content, &SkipPackages::default()).unwrap(); - assert!(result.updated); - assert_eq!(result.content, r#"/// "#); - } - #[test] fn test_rewrite_reference_types_vitest_browser() { let content = r#"/// "#; @@ -5680,14 +5628,6 @@ const { defineConfig } = require('vite-plus');"# } } - #[test] - fn test_rewrite_reference_types_vitest_scoped_browser_context() { - let content = r#"/// "#; - let result = rewrite_import_content(content, &SkipPackages::default()).unwrap(); - assert!(result.updated); - assert_eq!(result.content, r#"/// "#); - } - #[test] fn test_rewrite_reference_types_vitest_scoped_browser_playwright() { let content = r#"/// "#; diff --git a/crates/vp_pm_cli/src/resolution/commands/link.rs b/crates/vp_pm_cli/src/resolution/commands/link.rs index feea29e298..79bf0f74d4 100644 --- a/crates/vp_pm_cli/src/resolution/commands/link.rs +++ b/crates/vp_pm_cli/src/resolution/commands/link.rs @@ -79,33 +79,6 @@ mod tests { assert_eq!(command.args, vec!["link", "react"]); } - #[test] - fn test_pnpm_link_directory() { - let resolution = resolve( - &pnpm("10.0.0"), - LinkArgs { package: Some("./packages/utils".to_string()), ..Default::default() }, - ); - let command = expect_run(resolution.outcome); - - assert_eq!(command.program, "pnpm"); - assert_eq!(command.args, vec!["link", "./packages/utils"]); - } - - #[test] - fn test_pnpm_link_absolute_directory() { - let resolution = resolve( - &pnpm("10.0.0"), - LinkArgs { - package: Some("/absolute/path/to/package".to_string()), - ..Default::default() - }, - ); - let command = expect_run(resolution.outcome); - - assert_eq!(command.program, "pnpm"); - assert_eq!(command.args, vec!["link", "/absolute/path/to/package"]); - } - #[test] fn test_yarn_link_basic() { let resolution = resolve(&yarn("4.0.0"), LinkArgs::default()); @@ -127,18 +100,6 @@ mod tests { assert_eq!(command.args, vec!["link", "react"]); } - #[test] - fn test_yarn_classic_link_package() { - let resolution = resolve( - &yarn("1.22.0"), - LinkArgs { package: Some("react".to_string()), ..Default::default() }, - ); - let command = expect_run(resolution.outcome); - - assert_eq!(command.program, "yarn"); - assert_eq!(command.args, vec!["link", "react"]); - } - #[test] fn test_npm_link_basic() { let resolution = resolve(&npm("11.0.0"), LinkArgs::default()); diff --git a/crates/vp_pm_cli/src/resolution/commands/ping.rs b/crates/vp_pm_cli/src/resolution/commands/ping.rs index fbdfac5946..cc3c4e39e3 100644 --- a/crates/vp_pm_cli/src/resolution/commands/ping.rs +++ b/crates/vp_pm_cli/src/resolution/commands/ping.rs @@ -138,13 +138,4 @@ mod tests { assert_eq!(command.program, "npm"); assert_eq!(command.args, vec!["ping"]); } - - #[test] - fn test_yarn_classic_ping_uses_npm() { - let resolution = resolve(&yarn("1.22.0"), PingArgs::default()); - let command = expect_run(resolution.outcome); - - assert_eq!(command.program, "npm"); - assert_eq!(command.args, vec!["ping"]); - } } diff --git a/crates/vp_pm_cli/src/resolution/commands/unlink.rs b/crates/vp_pm_cli/src/resolution/commands/unlink.rs index 3ccc6aa2a8..9b1575779e 100644 --- a/crates/vp_pm_cli/src/resolution/commands/unlink.rs +++ b/crates/vp_pm_cli/src/resolution/commands/unlink.rs @@ -147,20 +147,6 @@ mod tests { assert_eq!(command.args, vec!["unlink", "react"]); } - #[test] - fn test_yarn_classic_unlink_package() { - let command = expect_run( - resolve( - &yarn("1.22.0"), - UnlinkArgs { package: Some("react".to_string()), ..Default::default() }, - ) - .outcome, - ); - - assert_eq!(command.program, "yarn"); - assert_eq!(command.args, vec!["unlink", "react"]); - } - #[test] fn test_yarn_unlink_recursive() { for version in ["3.0.0", "3.6.0", "4.18.0"] { diff --git a/crates/vp_setup/src/registry.rs b/crates/vp_setup/src/registry.rs index 5c6d5e8a32..71463b32c8 100644 --- a/crates/vp_setup/src/registry.rs +++ b/crates/vp_setup/src/registry.rs @@ -184,13 +184,6 @@ mod tests { }) } - #[test] - fn test_cli_package_name_construction() { - let suffix = "darwin-arm64"; - let name = format!("{PLATFORM_PACKAGE_SCOPE}/{CLI_PACKAGE_NAME_PREFIX}-{suffix}"); - assert_eq!(name, "@voidzero-dev/vite-plus-cli-darwin-arm64"); - } - #[test] fn test_platform_package_accepts_supported_provenance_predicates() { for predicate_type in SUPPORTED_PROVENANCE_PREDICATE_TYPES { @@ -370,47 +363,4 @@ mod tests { assert!(error.to_string().contains(TEST_PACKAGE_NAME)); assert!(error.to_string().contains(TEST_VERSION)); } - - #[test] - fn test_all_platform_suffixes_match_published_cli_packages() { - // These are the actual published CLI package suffixes - // (from packages/cli/publish-native-addons.ts RUST_TARGETS keys) - let published_suffixes = [ - "darwin-arm64", - "darwin-x64", - "linux-arm64-gnu", - "linux-arm64-musl", - "linux-x64-gnu", - "linux-x64-musl", - "win32-arm64-msvc", - "win32-x64-msvc", - ]; - - let published_packages: Vec = published_suffixes - .iter() - .map(|s| format!("{PLATFORM_PACKAGE_SCOPE}/{CLI_PACKAGE_NAME_PREFIX}-{s}")) - .collect(); - - // All known platform suffixes that detect_platform_suffix() can return - let detection_suffixes = [ - "darwin-arm64", - "darwin-x64", - "linux-arm64-gnu", - "linux-x64-gnu", - "linux-arm64-musl", - "linux-x64-musl", - "win32-arm64-msvc", - "win32-x64-msvc", - ]; - - for suffix in &detection_suffixes { - let package_name = - format!("{PLATFORM_PACKAGE_SCOPE}/{CLI_PACKAGE_NAME_PREFIX}-{suffix}"); - assert!( - published_packages.contains(&package_name), - "Platform suffix '{suffix}' produces CLI package name '{package_name}' \ - which does not match any published CLI package" - ); - } - } } diff --git a/crates/vp_static_config/src/lib.rs b/crates/vp_static_config/src/lib.rs index eb8eaa611b..1e79a3c7e3 100644 --- a/crates/vp_static_config/src/lib.rs +++ b/crates/vp_static_config/src/lib.rs @@ -586,24 +586,6 @@ mod tests { // ── Config file resolution ────────────────────────────────────────── - #[test] - fn resolves_ts_config() { - let dir = TempDir::new().unwrap(); - let dir_path = vt_path::AbsolutePathBuf::new(dir.path().to_path_buf()).unwrap(); - std::fs::write(dir.path().join("vite.config.ts"), "export default { run: {} }").unwrap(); - let result = resolve_static_config(&dir_path); - assert!(result.get("run").is_some()); - } - - #[test] - fn resolves_js_config() { - let dir = TempDir::new().unwrap(); - let dir_path = vt_path::AbsolutePathBuf::new(dir.path().to_path_buf()).unwrap(); - std::fs::write(dir.path().join("vite.config.js"), "export default { run: {} }").unwrap(); - let result = resolve_static_config(&dir_path); - assert!(result.get("run").is_some()); - } - #[test] fn resolves_mts_config() { let dir = TempDir::new().unwrap(); From 2a7e371913387ad9c336efa491e47495229e011b Mon Sep 17 00:00:00 2001 From: Liang Date: Tue, 20 Oct 2026 22:21:48 +0800 Subject: [PATCH 3/6] chore: retrigger CI From 6ad4079c6d65008cd0665572b2e315a53345e6f6 Mon Sep 17 00:00:00 2001 From: Liang Date: Tue, 20 Oct 2026 22:38:23 +0800 Subject: [PATCH 4/6] test: disable dependency scanning in core identity fixture --- .../cli_snapshots/fixtures/core_module_identity/vite.config.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/core_module_identity/vite.config.ts b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/core_module_identity/vite.config.ts index ac0bb7cb68..b1bfd8b0aa 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/core_module_identity/vite.config.ts +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/core_module_identity/vite.config.ts @@ -4,6 +4,8 @@ import { isRunnableDevEnvironment } from 'vite'; import { defineConfig, isRunnableDevEnvironment as fromVitePlus } from 'vite-plus'; export default defineConfig({ + // This fixture serves SSR middleware only; dependency scanning adds timing-dependent logs. + optimizeDeps: { noDiscovery: true }, server: { host: '127.0.0.1', port: 0 }, plugins: [ { From 6fb2c27d1b556322f1afb16a1c50e2bb66d5621e Mon Sep 17 00:00:00 2001 From: Liang Date: Tue, 20 Oct 2026 22:43:16 +0800 Subject: [PATCH 5/6] test: normalize optional Vite dependency scan progress --- .../core_module_identity/vite.config.ts | 2 -- .../tests/cli_snapshots/redact.rs | 9 +++++++++ crates/vp_cli_snapshots/tests/redact_unit.rs | 19 +++++++++++++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/core_module_identity/vite.config.ts b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/core_module_identity/vite.config.ts index b1bfd8b0aa..ac0bb7cb68 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/core_module_identity/vite.config.ts +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/core_module_identity/vite.config.ts @@ -4,8 +4,6 @@ import { isRunnableDevEnvironment } from 'vite'; import { defineConfig, isRunnableDevEnvironment as fromVitePlus } from 'vite-plus'; export default defineConfig({ - // This fixture serves SSR middleware only; dependency scanning adds timing-dependent logs. - optimizeDeps: { noDiscovery: true }, server: { host: '127.0.0.1', port: 0 }, plugins: [ { diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/redact.rs b/crates/vp_cli_snapshots/tests/cli_snapshots/redact.rs index b3c5ddddc0..08ed8f7f9d 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/redact.rs +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/redact.rs @@ -44,6 +44,14 @@ static VITEST_TRANSFORM_CACHE_HINT_RE: LazyLock = LazyLock::new(|| )) .unwrap() }); +// Vite prints this progress line only when dependency scanning takes over one second. +// Match the complete message so scan failures and other optimizer diagnostics survive. +static VITE_SCAN_PROGRESS_RE: LazyLock = LazyLock::new(|| { + regex::Regex::new( + r"(?m)^\d{1,2}:\d{2}:\d{2}(?:[ \x{202f}](?:AM|PM))? \[vite\+?\] \([^\r\n()]+\) \[optimizer\] scanning dependencies\.\.\.(?:\n|$)", + ) + .unwrap() +}); // Only v-prefixed versions are masked: tool and runtime banners all print // that form (`vite v7.3.2`, `vp v0.2.2`, `Node.js v24.18.0`) and churn on // every dep bump, while bare semver literals (`app-1.0.0.tgz`, @@ -559,6 +567,7 @@ pub fn redact_output( output = DURATION_RE.replace_all(&output, "").into_owned(); output = VITEST_TIMING_RE.replace_all(&output, "$1 ()").into_owned(); output = VITEST_TRANSFORM_CACHE_HINT_RE.replace_all(&output, "").into_owned(); + output = VITE_SCAN_PROGRESS_RE.replace_all(&output, "").into_owned(); // Redact semver-shaped versions (bundled tool versions, Node versions). output = VERSION_RE.replace_all(&output, "").into_owned(); diff --git a/crates/vp_cli_snapshots/tests/redact_unit.rs b/crates/vp_cli_snapshots/tests/redact_unit.rs index 40b9c4c3a4..b85488e1e2 100644 --- a/crates/vp_cli_snapshots/tests/redact_unit.rs +++ b/crates/vp_cli_snapshots/tests/redact_unit.rs @@ -11,6 +11,25 @@ mod redact; use redact::{redact_output, redact_version_probe_output}; +#[test] +fn omits_optional_vite_scan_progress_without_hiding_diagnostics() { + for timestamp in ["2:26:53 PM", "14:26:53", "2:26:53\u{202f}PM"] { + for prefix in ["vite", "vite+"] { + let progress = + format!("{timestamp} [{prefix}] (client) [optimizer] scanning dependencies..."); + for input in [progress.clone(), format!("{progress}\n")] { + assert_eq!(redact_output(input, &[], true), ""); + } + let diagnostics = format!( + "{timestamp} [{prefix}] (client) [optimizer] scanning dependencies... failed\n\ + {timestamp} [{prefix}] (client) (!) Failed to run dependency scan.\n" + ); + let input = format!("SSR check passed\n{progress}\n{diagnostics}"); + assert_eq!(redact_output(input, &[], true), format!("SSR check passed\n{diagnostics}")); + } + } +} + #[test] fn masks_yarn_compound_elapsed_times_as_one_duration() { for elapsed in ["999ms", "1s", "1s 0ms", "1m 2s", "1h 2m 3s 4ms"] { From 0ebbc9b468955e8cf8f1a6251541fa1bc845696e Mon Sep 17 00:00:00 2001 From: Liang Date: Tue, 20 Oct 2026 22:44:25 +0800 Subject: [PATCH 6/6] revert: remove shared dependency scan log normalization --- .../core_module_identity/vite.config.ts | 2 ++ .../tests/cli_snapshots/redact.rs | 9 --------- crates/vp_cli_snapshots/tests/redact_unit.rs | 19 ------------------- 3 files changed, 2 insertions(+), 28 deletions(-) diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/core_module_identity/vite.config.ts b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/core_module_identity/vite.config.ts index ac0bb7cb68..b1bfd8b0aa 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/core_module_identity/vite.config.ts +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/core_module_identity/vite.config.ts @@ -4,6 +4,8 @@ import { isRunnableDevEnvironment } from 'vite'; import { defineConfig, isRunnableDevEnvironment as fromVitePlus } from 'vite-plus'; export default defineConfig({ + // This fixture serves SSR middleware only; dependency scanning adds timing-dependent logs. + optimizeDeps: { noDiscovery: true }, server: { host: '127.0.0.1', port: 0 }, plugins: [ { diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/redact.rs b/crates/vp_cli_snapshots/tests/cli_snapshots/redact.rs index 08ed8f7f9d..b3c5ddddc0 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/redact.rs +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/redact.rs @@ -44,14 +44,6 @@ static VITEST_TRANSFORM_CACHE_HINT_RE: LazyLock = LazyLock::new(|| )) .unwrap() }); -// Vite prints this progress line only when dependency scanning takes over one second. -// Match the complete message so scan failures and other optimizer diagnostics survive. -static VITE_SCAN_PROGRESS_RE: LazyLock = LazyLock::new(|| { - regex::Regex::new( - r"(?m)^\d{1,2}:\d{2}:\d{2}(?:[ \x{202f}](?:AM|PM))? \[vite\+?\] \([^\r\n()]+\) \[optimizer\] scanning dependencies\.\.\.(?:\n|$)", - ) - .unwrap() -}); // Only v-prefixed versions are masked: tool and runtime banners all print // that form (`vite v7.3.2`, `vp v0.2.2`, `Node.js v24.18.0`) and churn on // every dep bump, while bare semver literals (`app-1.0.0.tgz`, @@ -567,7 +559,6 @@ pub fn redact_output( output = DURATION_RE.replace_all(&output, "").into_owned(); output = VITEST_TIMING_RE.replace_all(&output, "$1 ()").into_owned(); output = VITEST_TRANSFORM_CACHE_HINT_RE.replace_all(&output, "").into_owned(); - output = VITE_SCAN_PROGRESS_RE.replace_all(&output, "").into_owned(); // Redact semver-shaped versions (bundled tool versions, Node versions). output = VERSION_RE.replace_all(&output, "").into_owned(); diff --git a/crates/vp_cli_snapshots/tests/redact_unit.rs b/crates/vp_cli_snapshots/tests/redact_unit.rs index b85488e1e2..40b9c4c3a4 100644 --- a/crates/vp_cli_snapshots/tests/redact_unit.rs +++ b/crates/vp_cli_snapshots/tests/redact_unit.rs @@ -11,25 +11,6 @@ mod redact; use redact::{redact_output, redact_version_probe_output}; -#[test] -fn omits_optional_vite_scan_progress_without_hiding_diagnostics() { - for timestamp in ["2:26:53 PM", "14:26:53", "2:26:53\u{202f}PM"] { - for prefix in ["vite", "vite+"] { - let progress = - format!("{timestamp} [{prefix}] (client) [optimizer] scanning dependencies..."); - for input in [progress.clone(), format!("{progress}\n")] { - assert_eq!(redact_output(input, &[], true), ""); - } - let diagnostics = format!( - "{timestamp} [{prefix}] (client) [optimizer] scanning dependencies... failed\n\ - {timestamp} [{prefix}] (client) (!) Failed to run dependency scan.\n" - ); - let input = format!("SSR check passed\n{progress}\n{diagnostics}"); - assert_eq!(redact_output(input, &[], true), format!("SSR check passed\n{diagnostics}")); - } - } -} - #[test] fn masks_yarn_compound_elapsed_times_as_one_duration() { for elapsed in ["999ms", "1s", "1s 0ms", "1m 2s", "1h 2m 3s 4ms"] {