Skip to content

test(cli): analyze.test.ts reads the real ~/.squirrel and hangs on a machine with many projects #893

Closed

Description

@nc9

apps/cli/tests/controllers/analyze.test.ts calls runAnalyze({ crawlId: "nonexistent-id" }), which looks the id up across every project under the real ~/.squirrel/projects. With an empty home the file passes in under a second (7 tests). On a developer machine with 17,286 stored projects it did not finish in 200 s. CI passes because its runner's home is empty.

A test that reads the developer's real store is slow, and it depends on what that store holds.

Acceptance Criteria

  • analyze.test.ts runs against a temporary, empty home (or a projects path it sets), never the real ~/.squirrel
  • The file finishes in under 5 seconds on a machine whose real ~/.squirrel/projects holds thousands of projects
  • No other CLI controller test that looks up a crawl by id reads the real home (checked with a grep for findCrawlById and getProjectsPath in apps/cli/tests)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    choresize: XS

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions