HEX
Server: nginx/1.24.0
System: Linux nowruzgan 6.8.0-57-generic #59-Ubuntu SMP PREEMPT_DYNAMIC Sat Mar 15 17:40:59 UTC 2025 x86_64
User: babak (1000)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: /var/dev/nowruzgan/rest/node_modules/nedb/browser-version/test/testPersistence.js
console.log("Beginning tests");
console.log("Please note these tests work on Chrome latest, might not work on other browsers due to discrepancies in how local storage works for the file:// protocol");

function testsFailed () {
  document.getElementById("results").innerHTML = "TESTS FAILED";
}

var filename = 'test';

var db = new Nedb({ filename: filename, autoload: true });
db.remove({}, { multi: true }, function () {
  db.insert({ hello: 'world' }, function (err) {
    if (err) {
      testsFailed();
      return;
    }

    window.location = './testPersistence2.html';
  });
});