Skip to content

Add distribution-level smoke tests for package exports #23

Description

@Lakes41

Summary

Add tests that verify the built package can be consumed through its declared ESM, CommonJS, and TypeScript declaration exports.

Current Behaviour

Tests import from src, while package.json publishes dist through main, module, types, and exports. This leaves a gap where source tests can pass but package consumers still receive broken exports.

Expected Behaviour

CI should confirm that built package outputs are importable by downstream consumers.

Suggested Implementation

Add a smoke test script that runs after pnpm build. It should verify ESM import, CommonJS require, and TypeScript type resolution against the built package.

Files or Areas Likely Affected

  • package.json
  • tsup.config.ts
  • tests/
  • .github/workflows/ci.yml

Acceptance Criteria

  • A build smoke test imports the package using ESM
  • A build smoke test requires the package using CommonJS
  • A TypeScript compile check resolves dist/index.d.ts
  • CI runs the smoke test after pnpm build
  • The test fails clearly if package exports are misconfigured

Additional Notes

This should test the published package shape, not only internal source imports.

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official Campaign

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