Code Review and Performance Improvements#88
Merged
cahilfoley merged 3 commits intomainfrom Nov 9, 2025
Merged
Conversation
- Added vitest as the testing framework with full configuration - Created 130+ unit tests covering: - Utils: random, lerp, randomElement, getSize functions - Snowflake: initialization, updates, position wrapping, drawing - SnowfallCanvas: config management, snowflake lifecycle, animation - Hooks: useComponentSize, useSnowfallStyle, useDeepCompareEffect, useDeepMemo - Set up jsdom environment with Canvas and ResizeObserver mocks - Updated GitHub Actions workflow to run tests on PRs - Upgraded actions/checkout and actions/setup-node to v4 - All tests passing (130 passed, 7 skipped due to timing constraints) The test suite ensures code quality and prevents regressions in: - Snowflake physics and movement logic - Canvas rendering and cleanup - React hooks behavior - Configuration updates and validation
- Remove deprecated useWorkspaces option from lerna.json (lerna v8+) - Exclude test files from TypeScript compilation in tsconfig.json - Update .npmignore to exclude test directory and vitest config from npm package This fixes the CI build pipeline error and ensures test files are not included in the compiled output or published package.
- Remove Node 16.x (EOL) and 18.x from test matrix - Add Node 22.x (latest LTS) - Focus on current and next LTS versions for build tooling compatibility
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.
The test suite ensures code quality and prevents regressions in: