process.report.directory
版本历史
| 版本 | 变更 |
|---|---|
| v13.12.0, v12.17.0 | 此 API 不再是实验的。 |
| v11.12.0 | 新增于: v11.12.0 |
写入报告的目录。默认值为空字符串,表示将报告写入 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}`);