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

Commit 57b6f92a by Mick Hansen

feat(promises): updated mocha for promise support (eliminates the need for done())

1 parent 21074872
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
"pg": "~2.8.1", "pg": "~2.8.1",
"watchr": "~2.4.11", "watchr": "~2.4.11",
"chai": "~1.9.0", "chai": "~1.9.0",
"mocha": "~1.17.0", "mocha": "~1.18.2",
"chai-datetime": "~1.1.1", "chai-datetime": "~1.1.1",
"sinon": "~1.8.1", "sinon": "~1.8.1",
"mariasql": "0.1.20", "mariasql": "0.1.20",
......
...@@ -1323,7 +1323,7 @@ describe(Support.getTestDialectTeaser("HasMany"), function() { ...@@ -1323,7 +1323,7 @@ describe(Support.getTestDialectTeaser("HasMany"), function() {
}) })
describe('removing from the join table', function () { describe('removing from the join table', function () {
it('should remove a single entry without any attributes (and timestamps off) on the through model', function (done) { it('should remove a single entry without any attributes (and timestamps off) on the through model', function () {
var Worker = this.sequelize.define('Worker', {}, {timestamps: false}) var Worker = this.sequelize.define('Worker', {}, {timestamps: false})
, Task = this.sequelize.define('Task', {}, {timestamps: false}) , Task = this.sequelize.define('Task', {}, {timestamps: false})
, WorkerTasks = this.sequelize.define('WorkerTasks', {}, {timestamps: false}) , WorkerTasks = this.sequelize.define('WorkerTasks', {}, {timestamps: false})
...@@ -1332,7 +1332,7 @@ describe(Support.getTestDialectTeaser("HasMany"), function() { ...@@ -1332,7 +1332,7 @@ describe(Support.getTestDialectTeaser("HasMany"), function() {
Task.hasMany(Worker, { through: WorkerTasks }) Task.hasMany(Worker, { through: WorkerTasks })
// Test setup // Test setup
this.sequelize.sync().then(function() { return this.sequelize.sync().then(function() {
return Sequelize.Promise.all([ return Sequelize.Promise.all([
Worker.create({}), Worker.create({}),
Task.bulkCreate([{}, {}]).then(function () { Task.bulkCreate([{}, {}]).then(function () {
...@@ -1348,7 +1348,7 @@ describe(Support.getTestDialectTeaser("HasMany"), function() { ...@@ -1348,7 +1348,7 @@ describe(Support.getTestDialectTeaser("HasMany"), function() {
}); });
}).then(function (tasks) { }).then(function (tasks) {
expect(tasks.length).to.equal(1); expect(tasks.length).to.equal(1);
}).then(done.bind(null, null), done); });
}) })
}) })
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!