Better name for test db

pull/2/head
Louis Chatriot 11 years ago
parent a725b962b6
commit f3001d9ba1
  1. 2
      test/mocha.opts
  2. 4
      test/persistence.test.js
  3. 2
      test_lac/loadAndCrash.test.js

@ -1,2 +1,2 @@
--reporter spec
--timeout 10000
--timeout 10000

@ -264,14 +264,14 @@ describe('Persistence', function () {
for (i = 0; i < N; i += 1) {
toWrite += model.serialize({ _id: customUtils.uid(16), hello: 'world' }) + '\n';
}
fs.writeFileSync('workspace/rah.db', toWrite, 'utf8');
fs.writeFileSync('workspace/lac.db', toWrite, 'utf8');
// Loading it in a separate process that'll crash before finishing the load
cp = child_process.fork('test_lac/loadAndCrash.test')
cp.on('message', function (msg) {
// Let the child process enough time to crash
setTimeout(function () {
fs.readFileSync('workspace/rah.db', 'utf8').length.should.not.equal(0);
fs.readFileSync('workspace/lac.db', 'utf8').length.should.not.equal(0);
done();
}, 100);
});

@ -1,5 +1,5 @@
var Nedb = require('../lib/datastore.js')
, db = new Nedb({ filename: 'workspace/rah.db' })
, db = new Nedb({ filename: 'workspace/lac.db' })
;
// Simulate a crash in 100ms

Loading…
Cancel
Save