Skip to content

Commit 7edfbdd

Browse files
test: move live Gmail suite to e2e and drop test-only unit tests (#8)
* test: move live Gmail suite to e2e and drop test-only unit tests The live Gmail suites move to e2e/ with their helpers in e2e/helpers.ts. The credential, fixture and OAuth tests only exercised test harness code, so they are deleted. The tool-definition name list and schema-knob checks restated constants and are dropped. bun run test now covers src only, test:e2e runs the live suite, and CI runs the package test script and the e2e typecheck. AGENTS.md now runs bun run test. * chore(release): 0.1.1
1 parent f36a541 commit 7edfbdd

18 files changed

Lines changed: 550 additions & 777 deletions

‎.github/workflows/ci.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ jobs:
1919
- uses: oven-sh/setup-bun@v2
2020
- run: bun install --frozen-lockfile
2121
- run: bun run typecheck
22-
- run: bun test
22+
- run: bun run typecheck:e2e
23+
- run: bun run test
2324
- run: bun run build
2425
- name: node smoke
2526
run: |

‎AGENTS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ Instructions for AI agents working in this repository.
1717

1818
```bash
1919
bun install
20-
bun test
20+
bun run test
2121
```

‎CONTRIBUTING.md‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
```bash
66
bun install
77
bun run typecheck
8-
bun run typecheck:live
8+
bun run typecheck:e2e
99
bun run test
1010
bun run build
1111
```
@@ -23,7 +23,7 @@ GMAIL_LIVE_TEST=1 \
2323
GMAIL_LIVE_CLIENT_ID='...' \
2424
GMAIL_LIVE_CLIENT_SECRET='...' \
2525
GMAIL_LIVE_FIXTURE_QUERY='subject:(interchange-gmail-e2e-fixture)' \
26-
bun run test:live
26+
bun run test:e2e
2727
```
2828

2929
The full live suite has been verified against a dedicated Gmail fixture account.
@@ -45,3 +45,10 @@ deletes its draft, restores the fixture labels, and never sends email.
4545
The first run opens Google OAuth and stores the refresh token in the ignored
4646
`.local/gmail-live-token.json` file. Set `GMAIL_LIVE_TOKEN_FILE` when using a
4747
different token file. Credentials and message contents are not logged.
48+
49+
## Commit messages
50+
51+
Commit subjects and PR titles follow [Conventional Commits](https://www.conventionalcommits.org): `feat`, `fix`, `refactor`, `test`, `docs`, `build`, `ci`, `perf`, and `chore(release): x.y.z` for releases.
52+
Add `!` only for public API breaks: removed or renamed exports, changed signatures, newly required params. Peer and dependency range changes are `build(deps):` with no `!`.
53+
Keep subjects imperative, lowercase after the colon, 72 characters or less, and free of ticket IDs.
54+
Every PR links its issue with a `Closes <issue id>` line in the PR body.
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import { afterAll, beforeAll, describe, expect, test } from "bun:test";
22

3-
import { getArray, getString, isRecord } from "./json.js";
43
import {
54
createLiveHarness,
5+
getArray,
6+
getString,
7+
isRecord,
68
toolData,
7-
} from "./live-harness.js";
9+
} from "./helpers.js";
810

911
const LIVE_TEST_TIMEOUT_MS = 60_000;
1012
const mutationEnabled =
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { afterAll, beforeAll, describe, expect, test } from "bun:test";
22

3-
import { createLiveHarness, toolData, toolId } from "./live-harness.js";
3+
import { createLiveHarness, toolData, toolId } from "./helpers.js";
44

55
const LIVE_TEST_TIMEOUT_MS = 60_000;
66

0 commit comments

Comments
 (0)