-
yarn test -
npm run test
-
yarn test-cov -
nom run test-cov
- 替换
url中的环境变量
const a = `https://edu-activity.cn/activity?fe_env=e`; 转换为 const a = `https://edu-activity.cn/activity`;
- 为代码加入异常捕获
function sum(a, b){ return a+b+c; } 转换为 (function sum(a, b) { try { return a + b + c; } catch (error) { console.log(error); } });