mongojs
Version:
Easy to use module that implements the mongo api
18 lines (15 loc) • 386 B
JavaScript
var test = require('./tape')
var mongojs = require('../index')
var db = mongojs('test')
test('proxy', function (t) {
if (typeof Proxy === 'undefined') return t.end()
db.a.remove(function () {
db.a.insert({ hello: 'world' }, function () {
db.a.findOne(function (err, doc) {
t.error(err)
t.equal(doc.hello, 'world')
t.end()
})
})
})
})