Use the jslint.v8CoverageReportCreate() method to generate a V8 coverage report programmatically. This method accepts an options object containing:
coverageDir: The directory where the report will be saved.processArgv: An array of strings representing the command-line arguments, including JSLint flags (like --exclude or --include) and the command to execute (e.g., ['npm', 'run', 'test']).
import jslint from "../jslint.mjs";
await jslint.v8CoverageReportCreate({
coverageDir: "../.artifact/coverage_sqlite3_js/",
processArgv: [
"--exclude=test/**/*.js",
"--include=lib/**/*.js",
"npm", "run", "test"
]
});