我刚开始在JS中进行单元测试,学习jest框架。我对简单的toThrow()匹配器有问题,我用它来测试抛出错误函数。我编写了简单的foo()函数,它只抛出一个错误并使用toThrow()匹配程序进行测试。index.js throw new Error('bar');index.test.js
import {foo} from './index';
npm警告npm不支持Node.js v7.2.0,我尝试输入“npm卸载-g npm",但它不起作用,我如何修复它,谢谢you><
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npmcan't make any promises that npm will work with this ve