Skip to content

fix: 9 test files import from dist/ instead of src/ #71

@michaeldistel

Description

@michaeldistel

9 test files import from ../../dist/... — fail without a prior npm run build.

Files:

  • tests/backend/test-main-gen.test.ts
  • tests/backend/codegen-control-flow.test.ts
  • tests/backend/codegen-composite.test.ts
  • tests/backend/codegen-dynamic-memory.test.ts
  • tests/backend/codegen-fb.test.ts
  • tests/backend/codegen-oop.test.ts
  • tests/backend/codegen-vla.test.ts
  • tests/library/codesys-import.test.ts
  • tests/cli/cli-library.test.ts

Fix: replace dist/ with src/ in all import paths.

Why src/ works: vitest uses Vite's native TypeScript pipeline (via vite.config.ts) to transpile .ts files on-the-fly at test time — no compiled dist/ output is needed or used. The vitest config already sets include: ["src/**/*.ts"] for coverage, confirming src/ is the canonical source. Importing from dist/ means tests silently test stale compiled output rather than current source.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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