{"record":{"id":"ad4632f765edd73a","repo":"oxc-project/oxc","slug":"test-options-object-is-missing-a-timeout-propert","errorCode":null,"errorMessage":"Test options object is missing a `timeout` property.","messagePattern":"Test options object is missing a `timeout` property\\.","errorType":"validation","errorClass":"OxcDiagnostic","httpStatus":null,"severity":"error","filePath":"crates/oxc_linter/src/rules/vitest/require_test_timeout.rs","lineNumber":34,"sourceCode":"    },\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\nfn timeout_must_be_a_number(span: Span) -> OxcDiagnostic {\n    OxcDiagnostic::warn(\"Timeout must be a number.\")\n        .with_help(\"Use a non-negative numeric literal for the timeout value.\")\n        .with_label(span)\n}\n\nfn timeout_must_be_non_negative(span: Span) -> OxcDiagnostic {\n    OxcDiagnostic::warn(\"Timeout must not be negative.\")\n        .with_help(\"Use a non-negative numeric literal for the timeout value.\")\n        .with_label(span)\n}\n\n#[derive(Debug, Default, Clone)]\npub struct RequireTestTimeout;","sourceCodeStart":16,"sourceCodeEnd":52,"githubUrl":"https://github.com/oxc-project/oxc/blob/e1e7af627c8843ab64044ed466b128fcc21a035b/crates/oxc_linter/src/rules/vitest/require_test_timeout.rs#L16-L52","documentation":"Emitted by the vitest/require-test-timeout rule at a test invocation whose second argument is an options object that does not include a `timeout` property. Providing options without a timeout does not satisfy the rule's requirement that each test has an explicit timeout.","triggerScenarios":"Thrown at crates/oxc_linter/src/rules/vitest/require_test_timeout.rs:34 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add `timeout` to the options object, e.g. `test('name', { retry: 2, timeout: 5000 }, fn)`"],"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-14T05:17:10.506Z"}