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

Commit 22bb84da by sdepold

append the query object to the emitter to be able to test the query

1 parent f651fee0
Showing with 3 additions and 0 deletions
...@@ -238,6 +238,9 @@ module.exports = (function() { ...@@ -238,6 +238,9 @@ module.exports = (function() {
else else
query = self.sequelize.query(sqlOrQueryParams) query = self.sequelize.query(sqlOrQueryParams)
// append the query for better testing
emitter.query = query
query.success(function(obj) { query.success(function(obj) {
options.success && options.success(obj) options.success && options.success(obj)
self.emit(methodName, null) self.emit(methodName, null)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!