diff --git a/server/package.json b/server/package.json index 7c1addd..438c312 100644 --- a/server/package.json +++ b/server/package.json @@ -7,7 +7,7 @@ "dev": "tsx watch src/index.ts", "build": "tsc -p tsconfig.json", "typecheck": "tsc -p tsconfig.json --noEmit", - "test": "tsx --test src/*.test.ts", + "test": "tsx --test test/*.test.ts", "start": "node dist/index.js", "setup": "tsx src/cli.ts setup", "enroll": "tsx src/cli.ts enroll" diff --git a/server/src/auditLog.test.ts b/server/test/auditLog.test.ts similarity index 93% rename from server/src/auditLog.test.ts rename to server/test/auditLog.test.ts index ebef3b9..ba00cc3 100644 --- a/server/src/auditLog.test.ts +++ b/server/test/auditLog.test.ts @@ -16,7 +16,7 @@ test("readRecent skips a torn trailing line", async () => { ); // the module resolves AUDIT_LOG_PATH at import time process.env.AUDIT_LOG_PATH = logPath; - const { readRecent } = await import("./auditLog.js"); + const { readRecent } = await import("../src/auditLog.js"); const entries = await readRecent(); assert.equal(entries.length, 2); diff --git a/server/src/sync.test.ts b/server/test/sync.test.ts similarity index 93% rename from server/src/sync.test.ts rename to server/test/sync.test.ts index 9ba4da9..5d1a268 100644 --- a/server/src/sync.test.ts +++ b/server/test/sync.test.ts @@ -1,9 +1,9 @@ import { test } from "node:test"; import assert from "node:assert/strict"; import type { FastifyBaseLogger } from "fastify"; -import { Syncer, accountStreamUrl } from "./sync.js"; -import { openDb, setSyncState, getSyncState } from "./db.js"; -import type { PdsClient } from "./pdsClient.js"; +import { Syncer, accountStreamUrl } from "../src/sync.js"; +import { openDb, setSyncState, getSyncState } from "../src/db.js"; +import type { PdsClient } from "../src/pdsClient.js"; const stubLogger = { info() {}, warn() {}, error() {} } as unknown as FastifyBaseLogger;