尝试使用mock
mm(app.config.jwt, "enable", false)
console.info(JSON.stringify(app.config.jwt))
确实生效了。
但是nodejs.UnauthorizedError: No authentication token found
你试下在 plugin.unittest.js 中设置
exports.jwt ={
enable: false,
package: 'egg-jwt'
};
可以。 还能这么操作,太爽了。
Most helpful comment
你试下在 plugin.unittest.js 中设置