You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
311 B
13 lines
311 B
var test = require('./tape')
|
|
var mongojs = require('../index')
|
|
|
|
test('events connect', function (t) {
|
|
var db = mongojs('test', ['a'])
|
|
|
|
db.on('connect', function () {
|
|
t.pass('connect event emitted')
|
|
t.end()
|
|
})
|
|
|
|
db.a.find({}, function (err) { t.error(err, 'should find items without error') })
|
|
})
|
|
|