1// async/await
2it('responds with matching records', async function() {
3 const users = await db.find({ type: 'User' });
4 users.should.have.length(3);
5});
6
7// promise.then()
8it('should save without error', function(done) {
9 var user = new User('Luna');
10 user.save(function(err) {
11 if (err) done(err);
12 else done();
13 });
14});