summaryrefslogtreecommitdiff
path: root/tests/js/db.mjs
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-02-24 15:47:19 -0300
committerEuAndreh <eu@euandre.org>2024-02-24 15:47:19 -0300
commitd064f5ba5cc2fa592c0e7566560b05e9c4ed65dc (patch)
treefdc89ddd55c375e9a4ac7021375bfbaf48d2c0e7 /tests/js/db.mjs
parentsrc/hero.mjs: Add buildServer() (diff)
downloadpapod-d064f5ba5cc2fa592c0e7566560b05e9c4ed65dc.tar.gz
papod-d064f5ba5cc2fa592c0e7566560b05e9c4ed65dc.tar.xz
Normalize how modules import and name each other
Also add a `defaultInterceptors` variable in `src/hero.mjs` to avoid needing to redefine it in every application.
Diffstat (limited to 'tests/js/db.mjs')
-rw-r--r--tests/js/db.mjs15
1 files changed, 10 insertions, 5 deletions
diff --git a/tests/js/db.mjs b/tests/js/db.mjs
index fcea535..c6c5c85 100644
--- a/tests/js/db.mjs
+++ b/tests/js/db.mjs
@@ -2,8 +2,13 @@ import assert from "node:assert/strict";
import sqlite from "../../src/sqlite.cjs";
-import { runTests } from "../runner.mjs";
-import { promisifyDb, open, db, init } from "../../src/db.mjs";
+import * as runner from "../runner.mjs";
+import {
+ promisifyDb,
+ open,
+ handle,
+ init,
+} from "../../src/db.mjs";
const test_promisifyDb = t => {
@@ -88,16 +93,16 @@ const test_init = t => {
t.start("init()");
t.test("we only know how to deal with 1 database", async () => {
await init();
- const ref1 = db;
+ const ref1 = handle;
await init();
- const ref2 = db;
+ const ref2 = handle;
assert.notDeepEqual(ref1, ref2);
});
};
-await runTests([
+await runner.runTests([
test_promisifyDb,
test_open,
test_init,