{"record":{"id":"a98da7310d8c372c","repo":"oxc-project/oxc","slug":"test-is-missing-a-timeout","errorCode":null,"errorMessage":"Test is missing a timeout.","messagePattern":"Test is missing a timeout\\.","errorType":"validation","errorClass":"OxcDiagnostic","httpStatus":null,"severity":"error","filePath":"crates/oxc_linter/src/rules/vitest/require_test_timeout.rs","lineNumber":20,"sourceCode":"    AstKind,\n    ast::{Argument, Expression, ObjectPropertyKind, UnaryOperator},\n};\nuse oxc_diagnostics::OxcDiagnostic;\nuse oxc_macros::declare_oxc_lint;\nuse oxc_span::{GetSpan, Span};\n\nuse crate::{\n    context::LintContext,\n    rule::Rule,\n    rules::PossibleJestNode,\n    utils::{\n        JestFnKind, JestGeneralFnKind, KnownMemberExpressionProperty,\n        collect_possible_jest_call_node, parse_general_jest_fn_call,\n    },\n};\n\nfn test_missing_timeout(span: Span) -> OxcDiagnostic {\n    OxcDiagnostic::warn(\"Test is missing a timeout.\")\n        .with_help(\n            \"Add a numeric third argument, a `{ timeout }` option object second argument, or call `vi.setConfig({ testTimeout: ... })` before this test.\",\n        )\n        .with_label(span)\n}\n\nfn config_missing_timeout_object(span: Span) -> OxcDiagnostic {\n    OxcDiagnostic::warn(\"`vi.setConfig()` is missing a `testTimeout` property.\")\n        .with_help(\"Pass an object with a `testTimeout` property to `vi.setConfig()`.\")\n        .with_label(span)\n}\n\nfn test_options_missing_timeout_property(span: Span) -> OxcDiagnostic {\n    OxcDiagnostic::warn(\"Test options object is missing a `timeout` property.\")\n        .with_help(\"Add a `timeout` property to the options object.\")\n        .with_label(span)\n}\n","sourceCodeStart":2,"sourceCodeEnd":38,"githubUrl":"https://github.com/oxc-project/oxc/blob/e1e7af627c8843ab64044ed466b128fcc21a035b/crates/oxc_linter/src/rules/vitest/require_test_timeout.rs#L2-L38","documentation":"Emitted by the vitest/require-test-timeout rule at a test (or concurrent test) invocation that sets no timeout — no numeric third argument, no `{ timeout }` option object, and no prior `vi.setConfig({ testTimeout: ... })`. Without an explicit timeout the default applies, which the project wants avoided for slow/async tests.","triggerScenarios":"Thrown at crates/oxc_linter/src/rules/vitest/require_test_timeout.rs:20 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a numeric third argument: `test('name', fn, 5000)`","Or pass an options object: `test('name', { timeout: 5000 }, fn)`","Or set a global default earlier via `vi.setConfig({ testTimeout: 5000 })`"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e1e7af627c8843ab64044ed466b128fcc21a035b","analyzedAt":"2026-08-20T07:01:07.079Z","contentChangedAt":"2026-08-20T07:01:07.079Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}