-2
如何在node.js中做一个非常基本的功能测试?这里的逻辑:node.js中的基本功能测试
try {
function a()...
console.log("i am using function a");
} catch(err){
console.log(err)
} or {
function b()...
console.log("i am using function b");
}
如果第一个函数失败,打印出ERR日志,并继续使用第二功能,如果不使用第一个函数。