stevekane / promise-it-wont-hurt

A Workshopper module that teaches you to use promises in javascript
737 stars 219 forks source link

Error in Lesson 2:Verify: You did not use promise constructor and fulfill method (though i used) #147

Closed June057 closed 6 years ago

June057 commented 6 years ago

const Promise = require('es6-promise');

return new Promise(function (fulfill, reject) { setTimeout(function () { fulfill('FULFILLED!'); }, 300) }) .then(function(val){ console.log(val); });

addaleax commented 6 years ago

I think it’s complaining because you overwrote the “real” Promise constructor with require('es6-promise'). Does it help if you remove the first line?

June057 commented 6 years ago

Yes Thanks.