Low-severity correctness items (agent-reported; [needs repro]).
configureReporters default case missing return. packages/dredd/lib/configureReporters.js: the default branch constructs a BaseReporter then discards it.
BaseReporter invalid date. packages/dredd/lib/reporters/BaseReporter.js: new Date(test.start) without a presence guard yields Invalid Date / NaN durations when test.start is missing.
isURL not case-insensitive. packages/dredd/lib/isURL.ts: /^http(s)?:\/\// rejects HTTP://...; use the i flag.
reporterCount has no negative guard in the emitStart/emit accounting (TransactionRunner.js); === 0 can be missed if a callback fires more than once.
- Dead duplicate
else-if in packages/dredd/lib/reporters/ApiaryReporter.js:71 (both branches assign the same value; flagged by an inline eslint-disable). Already noted locally; fix the logic or drop the branch.
Tasks
Low-severity correctness items (agent-reported; [needs repro]).
configureReportersdefault case missingreturn.packages/dredd/lib/configureReporters.js: thedefaultbranch constructs aBaseReporterthen discards it.BaseReporterinvalid date.packages/dredd/lib/reporters/BaseReporter.js:new Date(test.start)without a presence guard yieldsInvalid Date/NaNdurations whentest.startis missing.isURLnot case-insensitive.packages/dredd/lib/isURL.ts:/^http(s)?:\/\//rejectsHTTP://...; use theiflag.reporterCounthas no negative guard in theemitStart/emit accounting (TransactionRunner.js);=== 0can be missed if a callback fires more than once.else-ifinpackages/dredd/lib/reporters/ApiaryReporter.js:71(both branches assign the same value; flagged by an inline eslint-disable). Already noted locally; fix the logic or drop the branch.Tasks
returninconfigureReporters.test.startbeforenew Date(...).iflag to theisURLregex.ApiaryReporter._getduplicate branch.