{"record":{"id":"c120d010777378bd","repo":"oxc-project/oxc","slug":"disabled-test","errorCode":null,"errorMessage":"Disabled test","messagePattern":"Disabled test","errorType":"validation","errorClass":"OxcDiagnostic","httpStatus":null,"severity":"warning","filePath":"crates/oxc_linter/src/rules/shared/jest_vitest/no_disabled_tests.rs","lineNumber":51,"sourceCode":"describe['skip']('bar', () => {});\nit['skip']('bar', () => {});\ntest['skip']('bar', () => {});\n\nxdescribe('foo', () => {});\nxit('foo', () => {});\nxtest('foo', () => {});\n\nit('bar');\ntest('bar');\n\nit('foo', () => {\n  pending();\n});\n```\n\";\n\nfn no_disabled_tests_diagnostic(x1: &'static str, x2: &'static str, span3: Span) -> OxcDiagnostic {\n    OxcDiagnostic::warn(x1).with_help(x2).with_label(span3)\n}\n\nenum Message {\n    MissingFunction,\n    Pending,\n    DisabledSuiteWithSkip,\n    DisabledSuiteWithX,\n    DisabledTestWithSkip,\n    DisabledTestWithX,\n}\n\nimpl Message {\n    pub fn details(&self) -> (&'static str, &'static str) {\n        match self {\n            Self::MissingFunction => (\"Test is missing function argument\", \"Add function argument\"),\n            Self::Pending => (\"Call to pending()\", \"Remove pending() call\"),\n            Self::DisabledSuiteWithSkip => (\"Disabled test suite\", \"Remove the appending `.skip`\"),\n            Self::DisabledSuiteWithX => (\"Disabled test suite\", \"Remove x prefix\"),","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/oxc-project/oxc/blob/a3d33dda7cb69da23db4fcaa2c0c05de61e760a1/crates/oxc_linter/src/rules/shared/jest_vitest/no_disabled_tests.rs#L33-L69","documentation":"The `Disabled test` diagnostic of oxlint rule `jest/no-disabled-tests` (shared with vitest), produced by Message::DisabledTestWithSkip and Message::DisabledTestWithX. It fires when an individual test case is disabled: `it.skip(...)` / `test.skip(...)` (help: remove the appending `.skip`) or the prefix forms `xit(...)` / `xtest(...)` (help: remove x prefix).","triggerScenarios":"From no_disabled_tests.rs:112-133: a general jest call of kind Test whose name starts with `x` (xit, xtest) or whose members include `skip` (it.skip, test.skip). The diagnostic spans the callee.","commonSituations":"Temporarily skipping a red test during a big refactor; committing `it.skip` while debugging and forgetting; suites where xtest came from copied legacy code; enabling the jest category in oxlint and discovering accumulated skips.","solutions":["Remove `.skip` / the `x` prefix and fix the test so it runs green","If the case is planned but unwritten, replace with test.todo('name') so it shows up as todo, not silently skipped","Audit skips at release time: rg -n '\\b(xit|xtest)\\b|\\b(it|test)\\.skip\\(' tests/ and require justification for each"],"exampleFix":"// before\nit.skip('handles timeout', fn);\nxtest('legacy shape', fn);\n\n// after\nit('handles timeout', fn);\ntest.todo('legacy shape');","handlingStrategy":"validation","validationCode":"rg -n \"\\b(?:xit|xtest)\\b|\\b(?:it|test)\\.skip\\(\" tests/ && exit 1 || exit 0 # fail on disabled tests","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Make the CI grep above non-fatal only for a tracked allowlist file","Prefer test.todo over it.skip for unwritten work","Attach an issue link to every intentional skip so cleanup is schedulable"],"tags":["jest","vitest","oxlint","testing","skipped-test"],"backgroundTag":"skipped-test","analyzedSha":"a3d33dda7cb69da23db4fcaa2c0c05de61e760a1","analyzedAt":"2026-08-20T07:01:07.079Z","contentChangedAt":"2026-08-20T07:01:07.079Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}