swc-project/swc · error
No test found
Error message
No test found
What it means
Raised at the end of expand_from in swc_testing_macros (fixture.rs:173). The macro expands each discovered fixture file into a #[test] function; if the collection ends with zero test functions — because the fixture directory is empty, all entries were filtered out by exclude() patterns, or every path was skipped as hidden — this panic fires. It signals the attribute was applied but produced no tests, usually indicating a wrong directory path or an over-broad exclude regex.
Source
Thrown at crates/testing_macros/src/fixture.rs:173
let path_str = abs_path.to_string_lossy();
let f = quote!(
#[test]
#[inline(never)]
#[doc(hidden)]
#[allow(non_snake_case)]
#ignored_attr
fn #test_ident() {
eprintln!("Input: {}", #path_str);
#callee(::std::path::PathBuf::from(#path_str));
}
);
test_fns.push(f);
}
if test_fns.is_empty() {
panic!("No test found")
}
Ok(test_fns)
}
/// Returns whether a manifest-relative fixture path contains a hidden
/// component.
fn is_ignored_fixture(path: &Path) -> bool {
path.components().any(|component| match component {
Component::Normal(name) => name.to_string_lossy().starts_with('.'),
_ => false,
})
}
struct InputParen {
input: Punctuated<LitStr, Token![,]>,
}
View on GitHub (pinned to 5176682b65)
Solutions
- Verify the directory passed to #[fixture] actually contains fixture files
- Loosen or fix the exclude() regexes if they are filtering out every fixture
- Print the scanned directory and the exclusion decisions before panicking to ease diagnosis
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/testing_macros/src/fixture.rs:173 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of swc-project/swc@5176682b65 (2026-08-17).
Data as JSON: /api/errors/e2e5750c4d9ba717.
Report an issue: GitHub.