From d064f5ba5cc2fa592c0e7566560b05e9c4ed65dc Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sat, 24 Feb 2024 15:47:19 -0300 Subject: 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. --- tests/js/db.mjs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'tests/js/db.mjs') 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, -- cgit v1.2.3