Skip to content

Commit

Permalink
[turbopack]: Remove skipped integration tests (#52421)
Browse files Browse the repository at this point in the history
#52413 removed all of our skipped tests, and the test suite that runs them will panic if none are found as a safety feature.
  • Loading branch information
jridgewell committed Jul 7, 2023
1 parent e50c918 commit 9ccc6fc
Showing 1 changed file with 1 addition and 24 deletions.
25 changes: 1 addition & 24 deletions packages/next-swc/crates/next-dev-tests/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ fn run_async_test<'a, T>(future: impl Future<Output = T> + Send + 'a) -> T {
#[testing::fixture("tests/integration/*/*/*/input")]
fn test(resource: PathBuf) {
let resource = resource.parent().unwrap().to_path_buf();
if resource.ends_with("__skipped__") || resource.ends_with("__flakey__") {
if resource.ends_with("__flakey__") {
// "Skip" directories named `__skipped__`, which include test directories to
// skip. These tests are not considered truly skipped by `cargo test`, but they
// are not run.
Expand Down Expand Up @@ -164,29 +164,6 @@ fn test(resource: PathBuf) {
};
}

#[testing::fixture("tests/integration/*/*/__skipped__/*/input")]
#[should_panic]
fn test_skipped_fails(resource: PathBuf) {
let resource = resource.parent().unwrap().to_path_buf();
let JsResult {
// Ignore uncaught exceptions for skipped tests.
uncaught_exceptions: _,
run_result,
} = run_async_test(run_test(resource));

// Assert that this skipped test itself has at least one browser test which
// fails.
assert!(
// Skipped tests sometimes have errors (e.g. unsupported syntax) that prevent tests from
// running at all. Allow them to have empty results.
run_result.test_results.is_empty()
|| run_result
.test_results
.into_iter()
.any(|r| !r.errors.is_empty()),
);
}

fn copy_recursive(from: &Path, to: &Path) -> std::io::Result<()> {
let from = canonicalize(from)?;
let to = canonicalize(to)?;
Expand Down

0 comments on commit 9ccc6fc

Please sign in to comment.