Testing: unit tests for SVG path length measuring
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- testing
Research direction
Start with pathLength and shapeLength in lib/svg/inspect.ts, then check lib/logo/animate.ts to see how the returned lengths are used. Add Vitest cases for a line, rectangle, circle, cubic and arc against known lengths within 1%, plus a check that relative and absolute path commands return the same value. Done means those tests pass under pnpm test.
Written by the indexing model from the issue text.
Description
Summary
Add Vitest tests for pathLength and shapeLength in lib/svg/inspect.ts, used by the animated logo export.
Where to look
lib/svg/inspect.tslib/logo/animate.ts: how the lengths are used
Acceptance criteria
- Tests cover a line, a rectangle, a circle, a cubic and an arc against known lengths (within 1%).
- Relative and absolute commands give the same result.
-
pnpm testpasses.
Getting started: fork the repo, then pnpm install and pnpm dev (Node 22+, pnpm 11, no API keys). Before opening a PR, run pnpm typecheck && pnpm test && pnpm lint && pnpm format:check && pnpm check:dashes && pnpm build. See CONTRIBUTING.md and the first contribution walkthrough.
Everything needed is in the repository. This doesn't need maintainer access, secrets or paid services. Comment below to claim it, and ask questions here any time.
- Dominant language
- TypeScript
- Stars
- 11
- Forks
- 3
- Avg merge
- 5h 58m
- Merged PRs (30d)
- 35
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from yakew7/DesignHub
-
area: ui difficulty: easy enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 87/100
Maintainers usually reply within 1 day
-
area: brand-dna difficulty: hard enhancement help wanted
Difficulty 5/5 Over a week Newbie friendliness 52/100
Maintainers usually reply within 1 day
-
accessibility area: ui difficulty: medium enhancement help wanted
Difficulty 3/5 1-2 days Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
area: ui difficulty: easy enhancement good first issue
Difficulty 4/5 3-5 days Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
area: backgrounds difficulty: medium enhancement help wanted
Difficulty 4/5 3-5 days Newbie friendliness 58/100
Maintainers usually reply within 1 day
All issues in yakew7/DesignHub
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
TomerAberbach/profiler-md#733 ·
Maintainers usually reply within 1 day
-
bug priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
brentspine/brents-toasts#143 ·
-
🐛 bug 🗺️ DB Models & Ops
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
LibreChat-AI/LibreChat#17214 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Wavvon/Wavvon-clients#136 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
umami-software/umami#4637 ·
Maintainers usually reply within 3 days