|
|
@ -268,6 +268,14 @@ describe('Database', function () { |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it('Can insert a doc with id 0', function (done) { |
|
|
|
|
|
|
|
d.insert({ _id: 0, hello: 'world' }, function (err, doc) { |
|
|
|
|
|
|
|
doc._id.should.equal(0); |
|
|
|
|
|
|
|
doc.hello.should.equal('world'); |
|
|
|
|
|
|
|
done(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Complicated behavior here. Basically we need to test that when a user function throws an exception, it is not caught |
|
|
|
* Complicated behavior here. Basically we need to test that when a user function throws an exception, it is not caught |
|
|
|
* in NeDB and the callback called again, transforming a user error into a NeDB error. |
|
|
|
* in NeDB and the callback called again, transforming a user error into a NeDB error. |
|
|
|