我正在尝试调试一些用Jest编写的失败测试。虽然可以这样做,但附加上chrome调试器就很好了,我注意到Istanbul很明显已经在工作,并且使我的文件更难以使用。
有人知道是否有禁用伊斯坦布尔的方法,或者以某种方式使Node通过地图文件的等效功能进行调试吗?
编辑
这是我要调试的文件的示例。在源代码中,它称为handlerFactory.js
,但在chrome中,当我从测试功能进入时,我最终调试了VM3376 handlerFactory.js
文件。
/* istanbul ignore next */
cov_6n2doqihv.s[10]++;
const insertCheckins = postgres => {
/* istanbul ignore next */
cov_6n2doqihv.f[2]++;
cov_6n2doqihv.s[11]++;
return (
/**
* Function to insert the records
* @param {Object} checkIns The check-in records
* @return {Promise}
*/
async checkIns => {
/* istanbul ignore next */
cov_6n2doqihv.f[3]++;
cov_6n2doqihv.s[12]++;
return Promise.all(checkIns.map(checkin => {
/* istanbul ignore next */
cov_6n2doqihv.f[4]++;
cov_6n2doqihv.s[13]++;
return insertRecord(postgres)(checkin);
}));
}
);
};