Skip to content

feat: migrate E2E to offline integration tests#27

Merged
Gumball12 merged 2 commits into
mainfrom
migrate-to-nock
Oct 25, 2025
Merged

feat: migrate E2E to offline integration tests#27
Gumball12 merged 2 commits into
mainfrom
migrate-to-nock

Conversation

@Gumball12

Copy link
Copy Markdown
Owner

Summary

  • Replace slow, flakey E2E tests with fast, deterministic offline integration tests.
  • Extract runtime orchestration into src/app.ts for clearer entrypoint and easier testing.
  • Update CI to run lint, unit, and integration tests with coverage.

Changes

Tests

  • Removed legacy E2E suite and helpers under src/e2e/**
  • Added integration tests under src/tests/integration/** with Nock-based network isolation
  • New vitest.integration.config.ts and integration setup (src/tests/integration/setup.ts)
  • Updated unit test config to exclude integration and keep coverage clean (vitest.config.ts)
  • Adjusted test helpers and setup to silence logs during tests

CI

  • .github/workflows/ci.yml now runs:
    • yarn lint && yarn test:unit
    • yarn test:integration
    • Codecov upload (coverage-final.json)
  • Conditional mocked-request tests on push/release via env

Runtime / Structure

  • New src/app.ts containing createRuntime, syncCommitsFlow, releaseTrackingFlow, and start
  • Simplified src/index.ts to initialize logging and delegate to app.start()

Docs

  • CONTRIBUTING.md: updated local dev flow, PAT guidance, and test commands
  • README.md: clarified testing sections and integration test usage
  • Added AGENTS.md for contributor/agent guidance

Tooling

  • package.json scripts: test:unit, test:integration, test (aggregate), lint uses prettier on {src,test}/*/.ts
  • yarn.lock updated
  • Removed vitest.e2e.config.ts

Rationale

  • Integration tests run fully offline and are more reliable, faster, and easier to maintain.
  • Separating entrypoint (index.ts) from orchestration (app.ts) improves readability and testability.
  • CI explicitly executes unit and integration suites, improving signal and isolation.

Breaking Changes

Noop; behavior should remain the same. Only test strategy and internal structure changed.

@Gumball12 Gumball12 self-assigned this Oct 25, 2025
chatgpt-codex-connector[bot]

This comment was marked as off-topic.

@Gumball12

Copy link
Copy Markdown
Owner Author

@codex review

@codecov

codecov Bot commented Oct 25, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.24%. Comparing base (7379dfb) to head (bed09db).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #27   +/-   ##
=======================================
  Coverage   99.24%   99.24%           
=======================================
  Files          19       19           
  Lines         797      797           
  Branches      184      184           
=======================================
  Hits          791      791           
  Misses          6        6           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/tests/integration/core-flows.test.ts
Comment thread src/tests/integration/release-tracking-comments.test.ts
@Gumball12 Gumball12 merged commit 014fa7d into main Oct 25, 2025
3 checks passed
@Gumball12 Gumball12 deleted the migrate-to-nock branch October 25, 2025 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant