This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import path from 'path'; | |
| import coverage from './Coverage-20260103T164118.json' with { type: 'json' }; | |
| import { mkdir, open } from 'fs/promises'; | |
| // Create an empty stub for the missing function between coverage ranges. | |
| function buildStub(gap) { | |
| const leadingWhitespace = gap.match(/^\s*/)?.[0] ?? ''; | |
| const trimmed = gap.slice(leadingWhitespace.length); | |
| const leadingPunctuation = trimmed.match(/^[,;]*/) ? trimmed.match(/^[,;]*/)[0] : ''; | |
| const content = trimmed.slice(leadingPunctuation.length).trimStart(); |