-
Notifications
You must be signed in to change notification settings - Fork 2
Add comprehensive test infrastructure with 230 tests and Node 22/24 + Yarn v4 compatibility #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: vothanhdat <8221386+vothanhdat@users.noreply.github.com>
Co-authored-by: vothanhdat <8221386+vothanhdat@users.noreply.github.com>
Co-authored-by: vothanhdat <8221386+vothanhdat@users.noreply.github.com>
Co-authored-by: vothanhdat <8221386+vothanhdat@users.noreply.github.com>
vothanhdat
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about walkingToIndexFactory and StateFactory @copilot
…gToIndexFactory, getObjectUniqueId) Co-authored-by: vothanhdat <8221386+vothanhdat@users.noreply.github.com>
Added comprehensive tests for both modules in commit 8396c0b: walkingToIndexFactory (40 tests):
StateFactory (19 tests):
Also added tests for supporting modules:
Total: 230 tests now passing (up from 114). |
vothanhdat
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot how about yarn v4, node 22, node 24.
Co-authored-by: vothanhdat <8221386+vothanhdat@users.noreply.github.com>
Compatibility added in commit 98fdbfe:
All tests and build verified working.
Added full compatibility in commit 98fdbfe: Node.js Support:
Yarn v4:
CI/CD:
|
Co-authored-by: vothanhdat <8221386+vothanhdat@users.noreply.github.com>
Implements test infrastructure from scratch for the react-obj-view library, addressing the complete absence of automated testing, and ensures compatibility with modern Node.js and Yarn versions.
Testing Framework
test,test:watch,test:ui,test:coverageTest Coverage (230 tests, 12 files)
Utilities (26 tests)
joinClasses: class name concatenation, falsy filteringobject: property access, getters, error handlinggroupedProxy: factory creation, caching, equality checksCore Engine (116 tests)
CircularChecking: circular reference detection with WeakSet, LIFO stack management, deep nesting supportStateFactory: state creation and caching, child state management, nested hierarchies, read-only accessgetObjectUniqueId: unique ID generation with WeakMap, object identity tracking, performance tested with 1000+ objectswalkingToIndexFactory: tree walking and indexing, node expansion/collapse, circular reference handling during traversal, state caching, path navigationResolvers (40 tests)
collections: Map/Set/Iterator resolvers in preview and normal modespromise: promise status tracking, InternalPromise wrapperLazyValueWrapper: instance caching, initialization, getter evaluationComponents (26 tests)
expandLevel,className,style,lineHeight,preview,showLineNumbersarrayGroupSize,objectGroupSize)Integration (22 tests)
Node.js & Yarn Compatibility
.nvmrcfilepackageManagerfield)enginesfield in package.json requiring Node >=22.0.0 and Yarn >=4.0.0CI/CD
.github/workflows/ci.ymltests against both Node 22.x and 24.x using Yarn 4Documentation
TESTING.md: framework overview, test patterns, debugging, CI/CD integration, prerequisites and setup instructionsREADME.mdwith testing section and system requirementsOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.