From 9ed0fe099762ab81ec37b8e645671af3b6752483 Mon Sep 17 00:00:00 2001 From: Josh Wulf Date: Wed, 3 Jun 2026 13:30:02 +1200 Subject: [PATCH] fix: test imports Signed-off-by: Josh Wulf --- compiler/src/tests/targets/test_nakama.ts | 14 +++++++------- compiler/src/tests/targets/test_notify.ts | 4 ++-- compiler/src/tests/targets/test_prisma.ts | 8 ++++---- compiler/src/tests/targets/test_react.ts | 4 ++-- compiler/src/tests/targets/test_sqlite.ts | 12 ++++++------ compiler/src/tests/targets/test_sqlite_e2e.ts | 12 ++++++------ 6 files changed, 27 insertions(+), 27 deletions(-) diff --git a/compiler/src/tests/targets/test_nakama.ts b/compiler/src/tests/targets/test_nakama.ts index 80049f7..67686cf 100644 --- a/compiler/src/tests/targets/test_nakama.ts +++ b/compiler/src/tests/targets/test_nakama.ts @@ -6,12 +6,12 @@ import { createHash } from "crypto"; import * as path from "path"; import * as fs from "fs"; -import { Lexer } from "../lexer"; -import { Parser } from "../parser"; -import { TypeChecker } from "../typechecker"; -import { Lowering } from "../lowering"; -import { NakamaEmitter } from "../emit_nakama"; -import { FullEmitter } from "../emit_full"; +import { Lexer } from "../../lexer"; +import { Parser } from "../../parser"; +import { TypeChecker } from "../../typechecker"; +import { Lowering } from "../../lowering"; +import { NakamaEmitter } from "../../emit_nakama"; +import { FullEmitter } from "../../emit_full"; // ─── Test harness ───────────────────────────────────────────────────────────── @@ -114,7 +114,7 @@ system Arena { `; const INVENTORY_EXAMPLE = fs.readFileSync( - path.resolve(__dirname, "../../examples/inventory_platform.marrow"), "utf-8" + path.resolve(__dirname, "../../../../examples/inventory_platform.marrow"), "utf-8" ); // ─── Test 1: Required files are emitted ─────────────────────────────────────── diff --git a/compiler/src/tests/targets/test_notify.ts b/compiler/src/tests/targets/test_notify.ts index 2b4914e..88e8599 100644 --- a/compiler/src/tests/targets/test_notify.ts +++ b/compiler/src/tests/targets/test_notify.ts @@ -9,8 +9,8 @@ * - sendWebhook posts to NOTIFY_WEBHOOK_URL with the right shape */ -import { emitNotifyService } from "../emit_notify"; -import * as IR from "../ir"; +import { emitNotifyService } from "../../emit_notify"; +import * as IR from "../../ir"; import * as http from "http"; import * as fs from "fs"; import * as path from "path"; diff --git a/compiler/src/tests/targets/test_prisma.ts b/compiler/src/tests/targets/test_prisma.ts index 08c4a1d..3322a36 100644 --- a/compiler/src/tests/targets/test_prisma.ts +++ b/compiler/src/tests/targets/test_prisma.ts @@ -10,10 +10,10 @@ import * as fs from "fs"; import * as path from "path"; import * as os from "os"; import { execSync } from "child_process"; -import { Lexer } from "../lexer"; -import { Parser } from "../parser"; -import { Lowering } from "../lowering"; -import { PrismaEmitter } from "../emit_prisma"; +import { Lexer } from "../../lexer"; +import { Parser } from "../../parser"; +import { Lowering } from "../../lowering"; +import { PrismaEmitter } from "../../emit_prisma"; import { createHash } from "crypto"; let passed = 0; diff --git a/compiler/src/tests/targets/test_react.ts b/compiler/src/tests/targets/test_react.ts index 99cf8c5..0bb7cf5 100644 --- a/compiler/src/tests/targets/test_react.ts +++ b/compiler/src/tests/targets/test_react.ts @@ -12,8 +12,8 @@ import * as fs from "fs"; import * as path from "path"; import * as os from "os"; import { execSync } from "child_process"; -import { emitReactHooks } from "../emit_react"; -import * as IR from "../ir"; +import { emitReactHooks } from "../../emit_react"; +import * as IR from "../../ir"; let passed = 0; let failed = 0; diff --git a/compiler/src/tests/targets/test_sqlite.ts b/compiler/src/tests/targets/test_sqlite.ts index b326325..5198337 100644 --- a/compiler/src/tests/targets/test_sqlite.ts +++ b/compiler/src/tests/targets/test_sqlite.ts @@ -16,10 +16,10 @@ import * as path from "path"; import * as os from "os"; import { execSync } from "child_process"; import { createHash } from "crypto"; -import { Lexer } from "../lexer"; -import { Parser } from "../parser"; -import { Lowering } from "../lowering"; -import { SqliteEmitter } from "../emit_sqlite"; +import { Lexer } from "../../lexer"; +import { Parser } from "../../parser"; +import { Lowering } from "../../lowering"; +import { SqliteEmitter } from "../../emit_sqlite"; const SAMPLE = ` system TestStore { @@ -76,14 +76,14 @@ function run(): void { // 3. Run migrations against an actual sqlite db // We do this by directly using better-sqlite3 from the compiler's node_modules // (it's already a transitive dep of ts-node tooling) — install only if missing. - const compilerNodeModules = path.resolve(__dirname, "..", "node_modules"); + const compilerNodeModules = path.resolve(__dirname, "..", "..", "..", "node_modules"); const sqliteModule = path.join(compilerNodeModules, "better-sqlite3"); if (!fs.existsSync(sqliteModule)) { console.log("\n (installing better-sqlite3 — first run only)"); try { execSync("npm install better-sqlite3@11.5.0 --no-save", { - cwd: path.resolve(__dirname, ".."), + cwd: path.resolve(__dirname, "..", "..", ".."), stdio: "pipe", }); } catch (e) { diff --git a/compiler/src/tests/targets/test_sqlite_e2e.ts b/compiler/src/tests/targets/test_sqlite_e2e.ts index 7f04d11..81bba3d 100644 --- a/compiler/src/tests/targets/test_sqlite_e2e.ts +++ b/compiler/src/tests/targets/test_sqlite_e2e.ts @@ -14,12 +14,12 @@ import * as fs from "fs"; import * as path from "path"; import * as os from "os"; import { execSync, spawn, ChildProcess } from "child_process"; -import { Lexer } from "../lexer"; -import { Parser } from "../parser"; -import { Lowering } from "../lowering"; -import { ConstraintSolver } from "../solver"; -import { optimize } from "../optimizer"; -import { SqliteEmitter } from "../emit_sqlite"; +import { Lexer } from "../../lexer"; +import { Parser } from "../../parser"; +import { Lowering } from "../../lowering"; +import { ConstraintSolver } from "../../solver"; +import { optimize } from "../../optimizer"; +import { SqliteEmitter } from "../../emit_sqlite"; import { createHash } from "crypto"; let passed = 0;