Skip to content

test: add deeper smoke tests for binary and npm bundle #1010

@BYK

Description

@BYK

Problem

Our current smoke tests only run --help and --version, which exercise none of the lazy-loaded code paths (SQLite, telemetry, auth DB, Ink sidecar). This allowed two critical bugs to ship:

  1. _require("../telemetry.js") in the CJS bundle — --help never triggers the lazy DB init
  2. with { type: "file" } crashing in tsx dev mode — --help never loads the Ink sidecar

Proposed Tests

Binary smoke test (CI build-binary job)

After building, run more than --help:

  • sentry-linux-x64 auth status — exercises SQLite init, DB schema, telemetry lazy import
  • sentry-linux-x64 init --yes --dry-run — exercises Ink sidecar loading (or graceful fallback)

npm bundle smoke test (CI build-npm job)

After building, run more than node dist/bin.cjs --help:

  • node dist/bin.cjs auth status — exercises CJS require resolution for all lazy imports
  • node dist/bin.cjs init --yes --dry-run — exercises sidecar path resolution in CJS context

E2E bundle test (test/e2e/bundle.test.ts)

Add a test that runs node dist/bin.cjs org list against a mock server to verify the full lazy-import chain works end-to-end.

Balance

These add ~2-3 seconds to each build job but catch entire categories of bundle/require resolution bugs that --help misses.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    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