如何使用--max_old_space_size运行角度测试coverage任务

时间:2018-09-03 12:58:14

标签: node.js angular npm

我得到了错误:

  

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)
>

如何在运行测试覆盖率之前增加堆空间?

0 个答案:

没有答案