我得到了错误:
JavaScript堆内存不足
当我运行ng test --code-coverage
时。
我正在尝试通过以下方式增加max_old_space_size
:
"scripts": {
"coverage": "node --max_old_space_size=8192 node_modules/.bin/ng test --code-coverage",
问题是,当节点运行max_old_space_size
时,它将保持运行状态,并且不会继续运行测试覆盖率任务:
> node --max_old_space_size=5048
>
(To exit, press ^C again or type .exit)
>
如何在运行测试覆盖率之前增加堆空间?