Skip to content

refactor: run all tests in per-file isolation, drop .isolated.test.ts suffix#55

Merged
khromov merged 10 commits into
mainfrom
rename-tests
May 27, 2026
Merged

refactor: run all tests in per-file isolation, drop .isolated.test.ts suffix#55
khromov merged 10 commits into
mainfrom
rename-tests

Conversation

@khromov

@khromov khromov commented May 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Every test file now runs in its own bun test process — the .isolated.test.ts suffix and batch-vs-isolated split are no longer needed
  • Renamed 20 *.isolated.test.ts files to *.test.ts, simplified run-tests.ts to run each file individually
  • Updated CLAUDE.md testing docs and removed the redundant npm files exclusion

Test plan

  • bun run test passes with the simplified runner
  • Verify no leftover .isolated.test.ts files exist

@github-actions

github-actions Bot commented May 26, 2026

Copy link
Copy Markdown
Contributor

Mochi review report

Try this PR

Expand instructions
gh run download -R khromov/mochi 26516134740 -n mochi-framework-pr -D /tmp/mochi-pr && bun i /tmp/mochi-pr/mochi-framework-pr.tgz

Download manually

Lines of code (non-blank lines)

packages/mochi
Category main PR Δ
src/**/*.test.ts 5444 5401 -43
Total 16218 16175 -43

Unchanged: src/Mochi.ts (1103), src/ComponentRegistry.ts (1516), src/hooks.ts (229), src/{requestContext,forms,errors}.ts (260), src/{events,log,logger}.ts (322), src/consoleLogger.ts (342), src/cookies*.ts (157), src/extensions.ts (191), src/cache.ts (60), src/middleware/** (81), src/enhance*.ts (184), src/build*.ts (250), src/proxy.ts (125), src/cli* (112), src/{csrf,serverIslandCrypto}.ts (240), src/{types.ts,*.d.ts} (608), src/web-components/** (445), src/debug-bar/** (1866), src/templates/** (790), Other (1893).

packages/docs
Category main PR Δ
Total 3588 3588 0

Unchanged: Docs (3588).

packages/site
Category main PR Δ
Total 9965 9965 0

Unchanged: src/demos/** (5616), src/components/** (2078), src/lib/** (940), src/stores/** (26), Other (1305).

packages/demos
Category main PR Δ
Total 3107 3107 0

Unchanged: src/hn/** (1085), Other (2022).

packages/minimal
Category main PR Δ
Total 538 538 0

Unchanged: Other (538).

packages/cli
Category main PR Δ
Total 479 479 0

Unchanged: src/**/*.test.ts (117), src/cli* (138), src/{create,templates,utils}.ts (220), Other (4).

@khromov khromov merged commit 68cdc06 into main May 27, 2026
3 checks passed
@github-actions github-actions Bot mentioned this pull request May 27, 2026
khromov pushed a commit that referenced this pull request May 29, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>mochi-framework: 0.5.0</summary>

##
[0.5.0](mochi-framework-v0.4.0...mochi-framework-v0.5.0)
(2026-05-28)


### Features

* hot-swap route handlers in dev mode
([#41](#41))
([106a4a2](106a4a2))
* opt-in route warmup to pre-warm static pages at startup
([#64](#64))
([9f28ede](9f28ede))
* replace highlight.js with Shiki
([#54](#54))
([3d2dc6a](3d2dc6a))


### Code Refactoring

* replace `cookie` npm package with Bun native cookie APIs
([#60](#60))
([4e0d953](4e0d953))
* run all tests in per-file isolation, drop .isolated.test.ts suffix
([#55](#55))
([68cdc06](68cdc06))
* vendor debounce, drop npm dependency
([#63](#63))
([d465fea](d465fea))
* vendor json-format-highlight, drop npm dependency
([#61](#61))
([0b88399](0b88399))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@khromov khromov deleted the rename-tests branch June 6, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant