不要怂,就是干,撸起袖子干!

Commit c9368843 by Mick Hansen

feat(promises): remove test that is outside spec

1 parent 698f5ae6
...@@ -34,6 +34,7 @@ var SequelizePromise = function(resolver) { ...@@ -34,6 +34,7 @@ var SequelizePromise = function(resolver) {
}; };
util.inherits(SequelizePromise, Promise) util.inherits(SequelizePromise, Promise)
Utils._.extend(SequelizePromise, Promise)
// Need to hack _then to make sure our promise is chainable // Need to hack _then to make sure our promise is chainable
SequelizePromise.prototype._then = function ( SequelizePromise.prototype._then = function (
......
...@@ -817,5 +817,7 @@ module.exports = (function() { ...@@ -817,5 +817,7 @@ module.exports = (function() {
} }
} }
Sequelize.Promise = Promise
return Sequelize return Sequelize
})() })()
...@@ -350,15 +350,6 @@ describe(Support.getTestDialectTeaser("Promise"), function () { ...@@ -350,15 +350,6 @@ describe(Support.getTestDialectTeaser("Promise"), function () {
done() done()
}) })
}) })
it('works for functions with only one return value', function (done) {
this.User
.find({ id: 1})
.spread(function(user) {
expect(user.id).to.equal(1)
expect(arguments.length).to.equal(1)
done()
})
})
}) })
}) })
......
...@@ -5,6 +5,11 @@ var fs = require('fs') ...@@ -5,6 +5,11 @@ var fs = require('fs')
, DataTypes = require(__dirname + "/../lib/data-types") , DataTypes = require(__dirname + "/../lib/data-types")
, Config = require(__dirname + "/config/config") , Config = require(__dirname + "/config/config")
// Make sure errors get thrown when testing
Sequelize.Promise.onPossiblyUnhandledRejection(function(e, promise){
throw e;
});
var Support = { var Support = {
Sequelize: Sequelize, Sequelize: Sequelize,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!