Replace Karma/Jasmine with Vitest in nimble-components#2766
Draft
fredvisser wants to merge 21 commits intomainfrom
Draft
Replace Karma/Jasmine with Vitest in nimble-components#2766fredvisser wants to merge 21 commits intomainfrom
fredvisser wants to merge 21 commits intomainfrom
Conversation
fredvisser
commented
Nov 26, 2025
| @@ -0,0 +1,31 @@ | |||
| # mac-test-reliability-fixes Development Guidelines | |||
Contributor
Author
There was a problem hiding this comment.
I'm planning to remove all of the .github, .specify, and .vscode changes - so please ignore
This ensures that when Vitest is invoked via npm workspaces from the monorepo root, all file paths are resolved relative to the package directory instead of the monorepo root, preventing absolute filesystem URLs in the Vite dev server.
- Add 60s browser launch timeout to playwright provider - Add hookTimeout configuration for better error handling - Enable server warmup for test files to reduce connection failures - Disable slowHijackESM to reduce iframe connection issues - Add GitHub Actions artifact upload for Vitest failure screenshots
jattasNI
reviewed
Dec 1, 2025
| @@ -0,0 +1,31 @@ | |||
| # mac-test-reliability-fixes Development Guidelines | |||
|
|
|||
Contributor
There was a problem hiding this comment.
I'm not planning to review this PR any time soon since it's enormous and the outcome isn't high priority, but please let me know if you think it should be.
- Add 30 minute timeout to build job to prevent hung tests - Set base path to './' to fix absolute filesystem URLs in CI - Allow parent directory access for node_modules resolution
Analysis shows we've been going in circles with path configurations. Created vitest-ci-debugging-history.md to track all attempted fixes. New approach: - Remove 'base' config entirely - let Vite auto-detect - Disable HMR in CI to prevent module resolution issues - Keep process.chdir() for working directory consistency This is a different angle - HMR can cause issues with module resolution in headless browser environments.
Previous attempt with base: './' and no base both failed. Testing if explicit base: '/' helps Vite construct proper URLs. Updated debugging history with Attempt 8 and 9.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
🤨 Rationale
@ni/nimble-componentstests execute faster, in more browsers, and with better tooling.👩💻 Implementation
vitest.config.ts, and wired up scripts for Chromium, Firefox, WebKit, coverage, and UI mode.setup-vitest.ts, async utilities, spy helpers, fake timers, etc.).nimble-componentsspec suite to Vitest expectations (spies, matchers, timers, custom helpers) and converted all components.@vitest/browseroverrides,npm run test:vitest:firefox, andnpm run test:vitest:webkit, then fixing the failing cases across the suite.test:vitest→test, refreshed documentation, and generated the beachball change file.🧪 Testing
npm run testnpm run test:vitest:firefoxnpm run test:vitest:webkitnpm run test:vitest:coveragenpm run test:vitest:uinpm run test)npm run lint✅ Checklist