hyperframes
hyperframes copied to clipboard
lint: add tests for two GSAP rules that have none
Problem
These lint rules have no test that mentions their code, so a change that breaks them would go unnoticed:
| Code | Severity | Defined at |
|---|---|---|
audio_reactive_single_tween_per_group |
warning | packages/lint/src/rules/gsap.ts:1526 |
gsap_group_selector_keyframes |
warning | packages/lint/src/rules/gsap.ts:2241 |
Tests go in packages/lint/src/rules/gsap.test.ts.
Proposed solution
Add tests to the matching *.test.ts file next to each rule, following the style of the other tests in that file. For each rule, add at least:
- one composition that triggers the finding, asserting the code and severity, and
- one similar composition that should not trigger it.
Read the rule's code first: the condition it checks tells you what the minimal triggering composition looks like.
Acceptance criteria
- Each code above is asserted by at least one positive and one negative test.
bun run --cwd packages/lint testpasses.- No rule behaviour changes. If writing a test shows a rule misbehaving, note it in the PR or open a separate issue rather than changing the rule in the same PR.
Working on these tests.