2022-09-30 05:39:11 +00:00

21 lines
589 B
JavaScript
Executable File

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';
});
});