diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 593dd0e..a0e9994 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: - uses: oven-sh/setup-bun@v2 - run: bun install --frozen-lockfile - run: bun run typecheck - - run: bun test + - run: bun run test - run: bun run build - name: node smoke run: | diff --git a/package.json b/package.json index 2e8cf13..297afd4 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "typecheck:live": "tsc -p tsconfig.live.json --noEmit", "build": "rm -rf dist && tsc -p tsconfig.build.json", "prepack": "bun run build", - "test": "bun test src tests/live/credential.test.ts tests/live/fixtures.test.ts tests/live/oauth.test.ts", + "test": "bun test src tests/unit", "test:live": "bun test tests/live" }, "peerDependencies": { diff --git a/tests/live/credential.test.ts b/tests/unit/credential.test.ts similarity index 94% rename from tests/live/credential.test.ts rename to tests/unit/credential.test.ts index 90dead1..43ec1c5 100644 --- a/tests/live/credential.test.ts +++ b/tests/unit/credential.test.ts @@ -1,7 +1,7 @@ import { describe, expect, test } from "bun:test"; -import { createStandaloneGmailCredential } from "./credential.js"; -import { type GmailOAuthConfig } from "./oauth.js"; +import { createStandaloneGmailCredential } from "../live/credential.js"; +import { type GmailOAuthConfig } from "../live/oauth.js"; const config: GmailOAuthConfig = { clientId: "client-id", diff --git a/tests/live/fixtures.test.ts b/tests/unit/fixtures.test.ts similarity index 96% rename from tests/live/fixtures.test.ts rename to tests/unit/fixtures.test.ts index 27a815f..6ef5799 100644 --- a/tests/live/fixtures.test.ts +++ b/tests/unit/fixtures.test.ts @@ -1,7 +1,7 @@ import { expect, test } from "bun:test"; import type { GmailTools } from "../../src/tools/create-tools.js"; -import { findGmailFixture } from "./fixtures.js"; +import { findGmailFixture } from "../live/fixtures.js"; test("findGmailFixture uses the Gmail tool argument contract", async () => { let call: diff --git a/tests/live/oauth.test.ts b/tests/unit/oauth.test.ts similarity index 98% rename from tests/live/oauth.test.ts rename to tests/unit/oauth.test.ts index f555516..2954a18 100644 --- a/tests/live/oauth.test.ts +++ b/tests/unit/oauth.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from "bun:test"; -import { readGmailOAuthConfig, refreshGmailAccessToken } from "./oauth.js"; +import { readGmailOAuthConfig, refreshGmailAccessToken } from "../live/oauth.js"; describe("Gmail OAuth", () => { test("normalizes the required configuration", () => { diff --git a/tsconfig.live.json b/tsconfig.live.json index 05082ea..3e82553 100644 --- a/tsconfig.live.json +++ b/tsconfig.live.json @@ -3,5 +3,5 @@ "compilerOptions": { "types": ["node", "@types/bun"] }, - "include": ["src", "tests/live"] + "include": ["src", "tests/unit", "tests/live"] } diff --git a/tsconfig.typecheck.json b/tsconfig.typecheck.json index fc8520e..46d70da 100644 --- a/tsconfig.typecheck.json +++ b/tsconfig.typecheck.json @@ -1,3 +1,4 @@ { - "extends": "./tsconfig.json" + "extends": "./tsconfig.json", + "include": ["src", "tests/unit"] }