process.report.directory


报告写入的目录。默认值为空字符串,表示报告将写入 Node.js 进程的当前工作目录。

【Directory where the report is written. The default value is the empty string, indicating that reports are written to the current working directory of the Node.js process.】

import { report } from 'node:process';

console.log(`Report directory is ${report.directory}`);const { report } = require('node:process');

console.log(`Report directory is ${report.directory}`);