1
0

move db tests cleanup test behind actual test

This commit is contained in:
Adrian Wannenmacher 2026-02-15 04:32:56 +01:00
parent 2af6cb4f6a
commit a27f3ac3af
Signed by: tfld
GPG Key ID: 19D986ECB1E492D5

View File

@ -48,18 +48,6 @@ export default function() {
inst = null;
});
QUnit.test.if(
"cleanup works",
// not yet baseline widely available, should be in November 2026
// TODO: check in November 2026, make unconditional if possible then
"databases" in indexedDB,
async function(assert) {
let dbs = await indexedDB.databases();
assert.true(
dbs.every(({name}) => name !== WbDb.DB_NAME_TEST),
"no testing db");
});
QUnit.test("cannot call constructor", function(assert) {
assert.throws(
function() { new WbDb(); },
@ -85,6 +73,18 @@ export default function() {
assert.strictEqual(inst.db.version, WbDb.DB_VERSION, "correct version");
});
QUnit.test.if(
"cleanup works",
// not yet baseline widely available, should be in November 2026
// TODO: check in November 2026, make unconditional if possible then
"databases" in indexedDB,
async function(assert) {
let dbs = await indexedDB.databases();
assert.true(
dbs.every(({name}) => name !== WbDb.DB_NAME_TEST),
"no testing db");
});
QUnit.test("opening is blocked", async function(assert) {
let first = WbDb.get(true, 1);
await waitForChange(first);