Skip to content

Add integration tests for PreviewSession.compile() with BuildContext #5

@obj-p

Description

@obj-p

PreviewSession.compile() has Tier 1/Tier 2 branching logic based on BuildContext that is only tested via the MCP agent integration test, not in the Swift test suite.

Add tests for:

  • compile() with Tier 1 BuildContext (bridge-only, @testable import)
  • compile() with Tier 2 BuildContext (source compilation, ThunkGenerator)
  • tryLiteralUpdate() returning nil for Tier 1

These need a real SPM project to build against (like examples/spm/), so they'll be slow (~5-10s). Consider a separate test suite or --filter convention for slow tests.

Identified in PR #3 review.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions