Fixed failing test

pull/2/head
Louis Chatriot 10 years ago
parent 3abfa53b06
commit d65e89fb82
  1. BIN
      test/.db.test.js.swo
  2. 5
      test/db.test.js

Binary file not shown.

@ -257,8 +257,11 @@ describe('Database', function () {
err.errorType.should.equal('uniqueViolated'); err.errorType.should.equal('uniqueViolated');
d.find({}, function (err, docs) { d.find({}, function (err, docs) {
// Datafile only contains index definition
var datafileContents = model.deserialize(fs.readFileSync(testDb, 'utf8'));
assert.deepEqual(datafileContents, { $$indexCreated: { fieldName: 'a', unique: true } });
docs.length.should.equal(0); docs.length.should.equal(0);
fs.readFileSync(testDb, 'utf8').length.should.equal(0); // Datafile not written to
done(); done();
}); });

Loading…
Cancel
Save