{"record":{"id":"d2b48a991aac8f79","repo":"avajs/ava","slug":"todo-tests-require-a-title","errorCode":null,"errorMessage":"`todo` tests require a title","messagePattern":"`todo` tests require a title","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"lib/runner.js","lineNumber":112,"sourceCode":"\t\t\t\tprocess.nextTick(() => {\n\t\t\t\t\thasStarted = true;\n\t\t\t\t\tthis.start();\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tmetadata.taskIndex = this.nextTaskIndex++;\n\n\t\t\tconst {args, implementation, title} = parseTestArgs(testArgs);\n\n\t\t\tmetadata.selected &&= this.checkSelectedByLineNumbers?.() ?? true;\n\n\t\t\tif (metadata.todo) {\n\t\t\t\tif (implementation) {\n\t\t\t\t\tthrow new TypeError('`todo` tests are not allowed to have an implementation. Use `test.skip()` for tests with an implementation.');\n\t\t\t\t}\n\n\t\t\t\tif (!title.raw) { // Either undefined or a string.\n\t\t\t\t\tthrow new TypeError('`todo` tests require a title');\n\t\t\t\t}\n\n\t\t\t\tif (!this.registerUniqueTitle(title.value)) {\n\t\t\t\t\tthrow new Error(`Duplicate test title: ${title.value}`);\n\t\t\t\t}\n\n\t\t\t\t// --match selects TODO tests.\n\t\t\t\tmetadata.selected &&= isTitleMatch(title.value, this.matchPatterns);\n\n\t\t\t\tthis.tasks.todo.push({title: title.value, metadata});\n\t\t\t\tthis.emit('stateChange', {\n\t\t\t\t\ttype: 'declared-test',\n\t\t\t\t\ttitle: title.value,\n\t\t\t\t\tknownFailing: false,\n\t\t\t\t\ttodo: true,\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tif (typeof implementation !== 'function') {","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/avajs/ava/blob/bbfd946322fdeca2b547a691d947fb4e18c0c67f/lib/runner.js#L94-L130","documentation":"Runner guard: test.todo() was called without a non-empty title (undefined, empty string, or otherwise falsy). A todo entry exists solely to be listed by name, so a title is mandatory. The input at fault is the missing or falsy title argument.","triggerScenarios":"Thrown at lib/runner.js:112 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a descriptive string title: test.todo('implement parser edge case')","Generate titles before declaring if they are dynamic","Remove the todo call if there is nothing to describe"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bbfd946322fdeca2b547a691d947fb4e18c0c67f","analyzedAt":"2026-09-02T01:24:43.834Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}