test(octree): Add unit tests for Octree, OctreeNode, and OctreeRegionUtils#728
Open
Quenty wants to merge 1 commit into
Open
test(octree): Add unit tests for Octree, OctreeNode, and OctreeRegionUtils#728Quenty wants to merge 1 commit into
Quenty wants to merge 1 commit into
Conversation
…Utils Adds Jest-based unit tests covering the octree public API and its internal region utilities, including edge cases: empty searches, coincident nodes, radius boundaries, k-nearest ordering and bounds, negative and cross-region coordinates, node moves and destruction, inclusive region bounds, octant classification, top-level cell rounding, and subregion pruning. Also wires up the package for testing (jest.config, test place project, server script template, and a test deploy target). The test placeId still needs provisioning via `nevermore deploy init --create-place`.
Deploy Results
1 deployed, 1 passed, 0 failed in 2.6s · View logs Test Results
1 tested, 0 passed, 1 failed in 1.4s · View logs |
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.
Adds Jest-based unit tests for the octree package covering the public API and internal region utilities, including edge cases.
The tests cover Octree (empty searches, coincident nodes, radius boundaries, k-nearest ordering and bounds, negative and cross-region coordinates, argument validation), OctreeNode (position get/set, no-op reposition, region moves, destruction, unpositioned destroy), and OctreeRegionUtils (inclusive region bounds, octant classification, top-level cell rounding at boundaries and negatives, hashing, region reuse/lookup, subregion creation, node add/move/remove with subregion pruning, and radius neighbor collection).
The package is also wired up for testing following the docs setup: jest.config.lua, a test place project, a server script template, and a test deploy target.
Note: the test deploy target currently has a placeholder placeId. It needs a real place provisioned via
nevermore deploy init --create-place(this could not run here because the environment ROBLOSECURITY cookie is expired). Until then the cloud tests job will not be able to run the octree tests.