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

Commit 7baaffb3 by Sascha Depold

idle test

1 parent 67848b3d
Showing with 23 additions and 0 deletions
var assert = require("assert")
, config = require("./../config")
, Sequelize = require("./../../index")
, sequelize = new Sequelize(config.database, config.username, config.password, {logging: false})
module.exports = {
'it should work correctly after being idle': function(exit) {
var User = sequelize.define('User', { username: Sequelize.STRING })
User.sync({force: true}).on('success', function() {
User.create({username: 'user1'}).on('success', function() {
User.count().on('success', function(count) {
assert.eql(count, 1)
setTimeout(function() {
User.count().on('success', function() { assert.eql(count, 1) })
exit(function(){})
}, 1000)
})
})
})
}
}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!