From bdf504ba37c1092d332bb6bcd7c8e1f349190c5c Mon Sep 17 00:00:00 2001 From: Dmytro Stanchiev Date: Thu, 22 Jan 2026 00:25:10 -0500 Subject: [PATCH] feat: testing setup Signed-off-by: Dmytro Stanchiev --- bun.lock | 3 ++- bunfig.toml | 3 +++ test/setup.ts | 12 ++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 bunfig.toml create mode 100644 test/setup.ts diff --git a/bun.lock b/bun.lock index a355580..e1d0f7b 100644 --- a/bun.lock +++ b/bun.lock @@ -1,10 +1,10 @@ { "lockfileVersion": 1, + "configVersion": 0, "workspaces": { "": { "name": "sone4ka-tok", "dependencies": { - "@types/cli-progress": "^3.11.6", "cli-progress": "^3.12.0", "linkedom": "^0.18.12", "unidecode": "^1.1.0", @@ -13,6 +13,7 @@ "@anthropic-ai/claude-code": "^2.0.1", "@musistudio/claude-code-router": "^1.0.53", "@types/bun": "latest", + "@types/cli-progress": "^3.11.6", "@types/unidecode": "^1.1.0", }, "peerDependencies": { diff --git a/bunfig.toml b/bunfig.toml new file mode 100644 index 0000000..0d41e0d --- /dev/null +++ b/bunfig.toml @@ -0,0 +1,3 @@ +[test] +# Test configuration +preload = ["./test/setup.ts"] \ No newline at end of file diff --git a/test/setup.ts b/test/setup.ts new file mode 100644 index 0000000..c197378 --- /dev/null +++ b/test/setup.ts @@ -0,0 +1,12 @@ +// Test setup for Bun test runner +import { expect } from "bun:test"; + +// Global test setup +// This file is loaded before any tests run due to bunfig.toml preload + +// Mock fetch globally for tests +global.fetch = global.fetch || (() => { + throw new Error('fetch is not available in test environment'); +}); + +// Add any global test utilities here \ No newline at end of file