1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-03 17:08:35 -05:00

chore: fix flaky specs::publish::npm_workspace_jsr_pkg_with_npm_dep::dep_and_workspace_dep (#27098)

Closes https://github.com/denoland/deno/issues/27097
This commit is contained in:
David Sherret 2024-11-26 19:32:30 -05:00 committed by GitHub
parent a750314e04
commit e2f7e031b3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 5 additions and 17 deletions

View file

@ -17,7 +17,6 @@ use file_test_runner::collection::CollectTestsError;
use file_test_runner::collection::CollectedCategoryOrTest;
use file_test_runner::collection::CollectedTest;
use file_test_runner::collection::CollectedTestCategory;
use file_test_runner::SubTestResult;
use file_test_runner::TestResult;
use once_cell::sync::Lazy;
use serde::Deserialize;
@ -256,19 +255,10 @@ fn run_test(test: &CollectedTest<serde_json::Value>) -> TestResult {
if metadata.ignore {
TestResult::Ignored
} else if let Some(repeat) = metadata.repeat {
TestResult::SubTests(
(0..repeat)
.map(|i| {
let diagnostic_logger = diagnostic_logger.clone();
SubTestResult {
name: format!("run {}", i + 1),
result: TestResult::from_maybe_panic(AssertUnwindSafe(|| {
run_test_inner(&metadata, &cwd, diagnostic_logger);
})),
}
})
.collect(),
)
for _ in 0..repeat {
run_test_inner(&metadata, &cwd, diagnostic_logger.clone());
}
TestResult::Passed
} else {
run_test_inner(&metadata, &cwd, diagnostic_logger.clone());
TestResult::Passed

View file

@ -1,4 +1,5 @@
{
"tempDir": true,
"tests": {
"dep_and_workspace_dep": {
"steps": [{

View file

@ -1 +0,0 @@
../add

View file

@ -1 +0,0 @@
../add