Skip to content

Add tests for the logo subsystem #3

Description

@jonfroehlich

From the June 2026 audit. The rest of the library now has solid coverage (95 cases across math/graphics/serial/array-utils), but the src/lib/logo/ subsystem (~4,500 lines: makelab-logo.js, makelab-logo-morpher.js, triangle-art.js, the intro animations) has zero tests.

What to cover

  • Pure geometry: Triangle/Cell/Grid construction, directions, bounds.
  • TriangleArt morph-target representation.
  • Color palette + MakeabilityLabLogoColorer.
  • morph-paths.js (linearPath/arcPath/bezierPath/spiralPath).
  • draw() methods can be smoke-tested against a mock 2D context (no real canvas needed).

Notes

  • Uses the existing zero-dependency runner in test/ (see test/README.md).
  • Good patterns to copy: test/line-segment.test.js (mock CanvasRenderingContext2D) and test/serial.test.js (mock-backed, environment-aware via skip()).
  • Likely pairs well with Get webpack working #1 (the split) — testing the extracted primitives is easier than the monolith.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions