Skip to content

test(campaigns): set APP_URL in the campaigns tests' own setup - #54

Merged
calvinbrewer merged 1 commit into
mainfrom
fix/campaigns-test-app-url
Dec 4, 2026
Merged

calvinbrewer merged 1 commit into
mainfrom
fix/campaigns-test-app-url

Conversation

@calvinbrewer

@calvinbrewer calvinbrewer commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Problem and change

The Release run for #53 failed before publishing @swirls/spools 0.12.0: https://github.com/ByteSliceHQ/spools/actions/runs/47255562331

bun run verify in the release job failed 12 tests in tests/integration/campaigns.test.ts with "APP_URL must be set (the CRM's public address) to make unsubscribe links". The file makes unsubscribe links but never set APP_URL; it passed only when another integration test file had set it earlier in the same process. In that run it was the first integration file to run.

Its beforeAll now sets APP_URL itself.

Review notes

  • Reproduce on main: cd packages/spools && bun test tests/integration/campaigns.test.ts fails 12 of 17. With this change, 17 pass.
  • Every other file in tests/integration was run on its own too and passes, so no other file leans on run order this way.
  • Why the order changed is not confirmed. The runner migration (.github/workflows: Migrate workflows to Blacksmith runners #52) merged just before and is the likely reason.
  • Nothing was published by the failed run (npm has 0.11.0). Merging this re-runs Release on main, which should publish 0.12.0.

Existing contributor checklist

  • bun run verify passes
  • Changeset added if package source changes: N/A, a test file only
  • Docs updated for API / architecture changes: N/A

🤖 Generated with Claude Code

Ask Polylane for an impact assessment of this pull request:

Assess with Polylane

The file made unsubscribe links without setting APP_URL, and passed only
when another test file had set it earlier in the same run. When it ran
first of the integration files, 12 tests failed and the release's verify
stopped before publishing 0.12.0.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@calvinbrewer
calvinbrewer merged commit 3017fdb into main Dec 4, 2026
11 checks passed
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