Skip to content

test(ui): isolate toast bus state between tests#92

Merged
DavidBabinec merged 1 commit into
mainfrom
fix/toast-provider-test-isolation
Jun 26, 2026
Merged

test(ui): isolate toast bus state between tests#92
DavidBabinec merged 1 commit into
mainfrom
fix/toast-provider-test-isolation

Conversation

@DavidBabinec

Copy link
Copy Markdown
Contributor

Summary

  • reset the Toast bus singleton from global test teardown after React cleanup
  • make Toast bus subscribers receive the current queue snapshot immediately, matching the documented contract
  • add focused Toast bus coverage for snapshot delivery and test isolation

Why

The v0.0.6 release workflow failed in toastProvider.test.tsx because earlier module-inserter tests left success toasts in the global Toast bus. When the provider test published its own toasts, the snapshot included stale queue entries from previous tests.

Verification

  • bun install
  • bun test src/__tests__/ui/toastBus.test.ts src/__tests__/ui/toastProvider.test.tsx
  • bun test src/__tests__/toolbar/modulePickerDropdown.test.tsx src/__tests__/ui/toastProvider.test.tsx
  • bun test (5715 pass, 1 skipped bundle-size test before build, 0 fail)
  • bun run build
  • bun test src/__tests__/architecture/bundle-size-budgets.test.ts
  • bun run lint
  • git diff --check
@DavidBabinec DavidBabinec merged commit a125a4a into main Jun 26, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant