One more test and recreate browser version

pull/2/head
Louis Chatriot 11 years ago
parent de1fccede9
commit 6cc64b10b9
  1. 3
      browser-version/out/nedb.js
  2. 4
      browser-version/out/nedb.min.js
  3. 2
      package.json
  4. 4
      test/db.test.js

@ -561,8 +561,7 @@ process.nextTick = (function () {
if (canPost) {
var queue = [];
window.addEventListener('message', function (ev) {
var source = ev.source;
if ((source === window || source === null) && ev.data === 'process-tick') {
if (ev.source === window && ev.data === 'process-tick') {
ev.stopPropagation();
if (queue.length > 0) {
var fn = queue.shift();

File diff suppressed because one or more lines are too long

@ -34,7 +34,7 @@
"commander": "1.1.1"
},
"scripts": {
"test": "./node_modules/.bin/mocha --reporter spec --timeout 2000"
"test": "./node_modules/.bin/mocha --reporter spec --timeout 10000"
},
"browser": {
"./lib/customUtils.js": "./browser-version/browser-specific/lib/customUtils.js",

@ -205,9 +205,13 @@ describe('Database', function () {
newDoc.stuff.should.equal(true);
newDoc._id.should.equal('test');
d.insert({ _id: 'test', otherstuff: 42 }, function (err) {
err.errorType.should.equal('uniqueViolated');
done();
});
});
});
it('Modifying the insertedDoc after an insert doesnt change the copy saved in the database', function (done) {
d.insert({ a: 2, hello: 'world' }, function (err, newDoc) {

Loading…
Cancel
Save