Skip to content

chore: paraglide test fails in fresh worktree without build #384

@ggfevans

Description

@ggfevans

Summary

The src/tests/paraglide.test.ts test fails in a fresh git worktree because the i18n files ($lib/i18n/paraglide/messages.js) are generated during build but not committed.

Steps to Reproduce

  1. Create a new worktree: git worktree add ../test -b test-branch
  2. Run npm install
  3. Run npm run test:run -- src/tests/paraglide.test.ts
  4. Test fails with: "Failed to resolve import '$lib/i18n/paraglide/messages.js'"

Expected Behavior

Tests should pass after npm install without requiring a full build.

Proposed Solutions

  1. Add i18n generation to postinstall: Add paraglide-js compile to npm postinstall script
  2. Add setup script for tests: Ensure i18n files exist before running tests
  3. Skip test if files don't exist: Make test gracefully skip if i18n not generated

Acceptance Criteria

  • npm run test:run passes in fresh worktree after npm install

Logged via /create-issue quick capture

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions