Skip to content

Re-enable @ark/attest completion snapshots for Issue #796 #895

@yamcodes

Description

@yamcodes

Summary

The type regression tests implemented in #894 currently use Vitest's built-in expectTypeOf for inference checking. Direct completion snapshots (using .completions()) are currently commented out due to a version conflict between @ark/attest@0.56.0 and arktype@2.2.0.

Context

Issue #796 identified a regression where string literal autocompletions for ArkType DSL values were lost. While expectTypeOf verifies that the types evaluate correctly, @ark/attest is the essentially only tool that can directly snapshot the IDE completion suggestions to ensure the developer experience doesn't regress.

Implementation Steps (Follow-up)

Once the upstream conflict is resolved (see arktypeio/arktype#1617):

  1. Uncomment tests in packages/arkenv/src/type-regression.test-d.ts:
    • Find the commented-out it("snapshots DSL completions ...") block.
    • Restore the attest calls.
  2. Re-enable globalSetup in packages/arkenv/vitest.config.ts:
    • Uncomment globalSetup: ["test/setup-attest.ts"].
  3. Update Snapshots:
    • Run pnpm test:types (which should now execute both Vitest typechecks and Attest snapshots).
    • If completions change, update them using vitest run --update-snapshots.

Dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    arkenvChanges to the `arkenv` npm package.blockedWork cannot proceed; waiting on something elseenhancementNew feature or requestready for humanRequires human implementationtestsThis issue or PR is about adding, removing or changing tests

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions