oxc-project/oxc · warning · OxcDiagnostic
Disabled test suite
Error message
Disabled test suite
What it means
The `Disabled test suite` diagnostic of oxlint rule `jest/no-disabled-tests` (shared with vitest), produced by both Message::DisabledSuiteWithSkip and Message::DisabledSuiteWithX variants. It fires when a describe block is disabled, either via `describe.skip(...)` (help: remove the appending `.skip`) or via the `xdescribe(...)` prefix form (help: remove x prefix).
Source
Thrown at crates/oxc_linter/src/rules/shared/jest_vitest/no_disabled_tests.rs:51
describe['skip']('bar', () => {});
it['skip']('bar', () => {});
test['skip']('bar', () => {});
xdescribe('foo', () => {});
xit('foo', () => {});
xtest('foo', () => {});
it('bar');
test('bar');
it('foo', () => {
pending();
});
```
";
fn no_disabled_tests_diagnostic(x1: &'static str, x2: &'static str, span3: Span) -> OxcDiagnostic {
OxcDiagnostic::warn(x1).with_help(x2).with_label(span3)
}
enum Message {
MissingFunction,
Pending,
DisabledSuiteWithSkip,
DisabledSuiteWithX,
DisabledTestWithSkip,
DisabledTestWithX,
}
impl Message {
pub fn details(&self) -> (&'static str, &'static str) {
match self {
Self::MissingFunction => ("Test is missing function argument", "Add function argument"),
Self::Pending => ("Call to pending()", "Remove pending() call"),
Self::DisabledSuiteWithSkip => ("Disabled test suite", "Remove the appending `.skip`"),
Self::DisabledSuiteWithX => ("Disabled test suite", "Remove x prefix"),View on GitHub (pinned to a3d33dda7c)
Solutions
- Remove `.skip` / the `x` prefix so the suite runs again (verify it passes)
- If the suite genuinely cannot run, gate it properly: use conditional describe guarded by environment, or move it behind a tag/annotation your runner supports
- Sweep for leftovers in CI: rg -n 'describe\.skip\(|xdescribe\(' in the repo, and treat new ones as review blockers
Example fix
// before
describe.skip('payment flow', () => { /* ... */ });
xdescribe('legacy api', () => { /* ... */ });
// after
describe('payment flow', () => { /* ... */ });
describe('legacy api', () => { /* ... */ }); Defensive patterns
Strategy: validation
Validate before calling
rg -n "\bxdescribe\(|\bdescribe\.skip\(" tests/ && exit 1 || exit 0 # fail on disabled suites Prevention
- Wire the grep above (or oxlint with --deny-warnings) into CI so describe.skip blocks the merge
- Fix broken suites instead of skipping them; skip only with a linked issue comment
- Review `.skip` occurrences in every PR diff as a mandatory checklist item
When it happens
Trigger: From no_disabled_tests.rs:114-133: any parsed general jest call whose name starts with `x` (xdescribe) or whose member chain contains `skip` (describe.skip), where the parsed kind is JestGeneralFnKind::Describe. The diagnostic labels the callee span.
Common situations: Commenting out a broken suite by skipping it instead; merging branches where describe.skip was never removed; batch-disabling slow suites before a demo; stale skips left after the underlying bug was fixed.
Related errors
- Enforces a maximum depth to nested describe calls.
- Describe block title is used multiple times in the same desc
- Disabled test
- Matchers must be called to assert.
- Expect has an unknown modifier.
AI-assisted analysis of oxc-project/oxc@a3d33dda7c (2026-08-20).
Data as JSON: /api/errors/b508e8518ec8fa34.
Report an issue: GitHub.