Commit 8a06a8c4 authored by Luke Sandberg's avatar Luke Sandberg

Extract pure batching algorithm for unit testing

Refactor compute_style_groups to extract the core batching logic into a
separate compute_style_batches function that operates on plain usize keys
instead of Vc types. This allows writing synchronous unit tests without
needing a turbo-tasks runtime.

Add 14 unit tests covering:
- Basic shared module batching
- Contiguity check preventing non-adjacent batching (with size limits)
- Global CSS isolation (no leaking into unrelated routes)
- Size budget enforcement
- Module dependents computation (universal predecessor, non-universal)
- Contiguity absorbing intervening modules
- Reverse-direction watermark handling
Co-Authored-By: 's avatarClaude <noreply@anthropic.com>
parent 3f8e55a3
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment