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
Additional Notes
This should test the published package shape, not only internal source imports.
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, whilepackage.jsonpublishesdistthroughmain,module,types, andexports. 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.jsontsup.config.tstests/.github/workflows/ci.ymlAcceptance Criteria
dist/index.d.tspnpm buildAdditional Notes
This should test the published package shape, not only internal source imports.