I expect Bluebird forgotten return warning to appear but it doesn't work for some reason.
A demo:
const Bluebird = require('bluebird');
Bluebird.config({
warnings: true
})
Bluebird.resolve(1)
.then(() => {
Bluebird.resolve(2); // should warn about forgotten return
})
.then(two => console.log(two));
How can it be fixed to output a warning?
I suspect I already encountered this problem before but I don't remember what was the solution.
from Bluebird forgotten return warning is missing
No comments:
Post a Comment