子进程选项继承


¥Child process option inheritance

在进程隔离模式(默认)下运行测试时,生成的子进程会从父进程继承 Node.js 选项,包括 配置文件 中指定的选项。但是,某些标志会被过滤掉以启用正确的测试运行器功能:

¥When running tests in process isolation mode (the default), spawned child processes inherit Node.js options from the parent process, including those specified in configuration files. However, certain flags are filtered out to enable proper test runner functionality:

  • --test - 防止递归测试执行

    ¥--test - Prevented to avoid recursive test execution

  • --experimental-test-coverage - 由测试运行器管理

    ¥--experimental-test-coverage - Managed by the test runner

  • --watch - 监视模式在父级处理

    ¥--watch - Watch mode is handled at the parent level

  • --experimental-default-config-file - 配置文件加载由父进程处理

    ¥--experimental-default-config-file - Config file loading is handled by the parent

  • --test-reporter - 报告由父进程管理

    ¥--test-reporter - Reporting is managed by the parent process

  • --test-reporter-destination - 输出目标由父级控制

    ¥--test-reporter-destination - Output destinations are controlled by the parent

  • --experimental-config-file - 配置文件路径由父进程管理

    ¥--experimental-config-file - Config file paths are managed by the parent

命令行参数、环境变量和配置文件中的所有其他 Node.js 选项都将被子进程继承。

¥All other Node.js options from command line arguments, environment variables, and configuration files are inherited by the child processes.