mirror of
https://github.com/TanStack/router.git
synced 2026-11-16 19:38:07 +00:00
* test: add invariant, property, and exhaustive tests for code-splitter shared bindings Add 76 new tests across three layers for the shared virtual module code-splitting logic introduced in #6659: Layer 1 - Algebraic property tests on helper functions: - expandTransitively: idempotence, monotonicity, cycle handling - buildDependencyGraph: subset invariants - removeBindingsDependingOnRoute: direct/transitive removal - expandDestructuredDeclarations: idempotence, sibling expansion - collectLocalBindingsFromStatement: all declaration types Layer 2 - Invariant tests on computeSharedBindings: - Route is never in the shared set - Results are always real local bindings (never imports) - Destructured siblings cohesion - Transitive dependency inclusion - Route-dependent binding exclusion - Determinism across repeated calls Layer 3 - Small-scope exhaustive tests: - Single binding × 3 declaration kinds × 4 property patterns × 2 groupings - Two bindings × 4 cross-group reference patterns × 2 groupings - Transitive dependency chains (linear, 3-deep, diamond) - Meta-invariant conformance across all shared-* fixture files Testing approach inspired by: https://gist.github.com/KyleAMathews/64bcea53a57f600cc3b73bc366d9ac4d Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * ci: apply automated fixes --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> |
History
|
|
|---|---|---|
| .. | ||
| add-hmr | ||
| code-splitter | ||
| config/withJson | ||
| delete-nodes | ||
| add-hmr.test.ts | ||
| code-splitter.test.ts | ||
| config.test.ts | ||
| constants.ts | ||
| delete-nodes.test.ts | ||
| detect-route-codesplit-groupings.test.ts | ||
| shared-bindings-helpers.test.ts | ||
| utils.test.ts | ||