Skip to content

refactor(lint): split monolithic test file into per-rule-module test files#181

Merged
miguel-heygen merged 1 commit intomainfrom
refactor/lint-test-split
Apr 1, 2026
Merged

refactor(lint): split monolithic test file into per-rule-module test files#181
miguel-heygen merged 1 commit intomainfrom
refactor/lint-test-split

Conversation

@miguel-heygen
Copy link
Copy Markdown
Collaborator

@miguel-heygen miguel-heygen commented Apr 1, 2026

Summary

  • Splits the 872-line hyperframeLinter.test.ts into focused per-domain test files matching the rule module structure from refactor(lint): break 1,314-line monolith into focused rule modules with plugin system #170
  • Tests still use the public API (lintHyperframeHtml) — no internals exposed
  • Fixes misplaced tests: gsap_css_transform_conflict tests were inside describe("lintScriptUrls"), caption/adapter tests were inside describe("template_literal_selector rule")

New structure

src/lint/
  hyperframeLinter.test.ts   — orchestrator integration + lintScriptUrls (8 tests)
  rules/
    core.test.ts             — root attrs, timeline registry, host id (6 tests)
    media.test.ts            — duplicate ids, missing id/src, preload (6 tests)
    gsap.test.ts             — clip element, transform conflict, missing script (12 tests)
    captions.test.ts         — caption exit, overflow, relative position (5 tests)
    composition.test.ts      — external script, template literal selector (5 tests)
    adapters.test.ts         — missing Lottie/Three.js scripts (8 tests)

Test plan

  • 404 tests pass (402 before — 2 extra from previously misplaced adapter tests now correctly counted)
  • Lint + format clean

@miguel-heygen miguel-heygen merged commit 2213e9f into main Apr 1, 2026
21 checks passed
Copy link
Copy Markdown
Collaborator Author

Merge activity

@miguel-heygen miguel-heygen deleted the refactor/lint-test-split branch April 6, 2026 23:24
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.

2 participants