Please return a promise instead.
原因:promise 函数返回直接用了return
解决:
validate().then(async () => {
if(false){
return new Promise((resolve, reject) => {
resolve('failed')
});
}
if(false){
return Promise.resolve('failed')
}
})
拓展: