Commit Graph

2 Commits

Author SHA1 Message Date
Ashley Hunter 1b743f8019 test: migrate from jest to vitest with browser testing for brain/helm
Replace Jest with Vitest across the workspace. The brain and helm Angular suites
now run in a real browser (Playwright/Chromium via Vitest browser mode) so they
exercise real layout, focus, pointer events and computed styles that jsdom could
not. The cli, tools, mcp, registry and cli-smoke suites run on Vitest's node
environment.

- Add per-project vite configs and switch test targets to @nx/vitest:test
- Convert jest APIs to vi.* and jest module mocks to vi.mock with importOriginal
- Replace jest-axe with a browser-native axe-core helper and toHaveNoViolations
- Regenerate snapshots in vitest format (content unchanged, format-only)
- Remove all jest packages, configs, the preset and the @nx/jest target default
- Install Playwright Chromium in the CI unit job for the browser suites

Also fixes a brain avatar test that asserted inside a fire-and-forget setTimeout,
which passed vacuously under jsdom and only surfaced once a real browser loaded
the image.
2026-06-13 15:16:45 +01:00
Marc Stammerjohann 20caa638ee feat: integrate sonner as brain entry (#1252)
* feat(sonner): add brain sonner entry

* feat(sonner): remove ngx-sonner and use @spartan-ng/brain/sonner

* docs(sonner): add brain api section

* fix(sonner): vanishing of custom icons

* feat(sonner): add toaster spec and update snapshot

* fix(sonner): filter toasts/heights by position in toast to expand toasts grouped by position

* feat(sonner): add sonner toaster config

* feat(sonner): use Directionality for dir, use afterNextRender and DOCUMENT for window access

* remove dir prop

* feat(sonner): update modifiers and type imports

* feat(sonner): update snapshot

* feat(sonner): add sonner healthcheck and migration to migrate ngx-sonner

* fix(sonner): update healthcheck guard

* feat(sonner): copy to helm

* fix(sonner): update comment

* fix(sonner): replace comment

* fix(sonner): update migration test message

* feat(sonner): replace all in migration

* feat(sonner): use injected document, update comments

* feat(sonner): use clsx

* feat(sonner): use computed for classes

* docs(sonner): update about
2026-03-12 11:02:37 +01:00