-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日誌,並繼續使用第二功能,如果不使用第一個函數。