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

Commit cb6c493d by Jan Aagaard Meier

fix: Lint

1 parent b2682cf9
......@@ -246,7 +246,7 @@ ConnectionManager.prototype.$connect = function(config) {
return this.sequelize.runHooks('beforeConnect', config).bind(this).then(function () {
return this.dialect.connectionManager.connect(config);
}).then(function(connection) {
return this.sequelize.runHooks('afterConnect', connection, config).return(connection)
return this.sequelize.runHooks('afterConnect', connection, config).return(connection);
});
};
ConnectionManager.prototype.$disconnect = function(connection) {
......@@ -254,7 +254,7 @@ ConnectionManager.prototype.$disconnect = function(connection) {
};
ConnectionManager.prototype.$validate = function(connection) {
if (!this.dialect.connectionManager.validate) return true
if (!this.dialect.connectionManager.validate) return true;
return this.dialect.connectionManager.validate(connection);
};
......
......@@ -62,16 +62,16 @@ describe('connection manager', function () {
});
it('should call afterConnect', function() {
const spy = sinon.spy();
var spy = sinon.spy();
this.sequelize.afterConnect(spy);
var connectionManager = new ConnectionManager(this.dialect, this.sequelize);
return connectionManager.$connect({}).then(() => {
return connectionManager.$connect({}).then(function() {
expect(spy.callCount).to.equal(1);
expect(spy.firstCall.args[0]).to.equal(this.connection);
expect(spy.firstCall.args[1]).to.eql({});
});
}.bind(this));
});
});
});
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!