-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: ensure consistency of
ContextNode
keys and add new tests (#6254
) * refactor: a bit more verbose code for traversing tree nodes To make it a bit easier to read and debug. * chore: add JSDocs for `ContextNode` to explain its semantics * test: add test for the current semantics of `getByContext` * test: add test to ensure internal state and invariants of `TreeCache` * fix: prevent unwanted key mutations in `ContextNode` Use a copy of a context key array when creating a new node. Otherwise, the parent node will be modified and while child node creation, and will get the same key. It doesn't seem to be an actual bug, but such keys look very confusing in the debugger.
- Loading branch information
1 parent
225bc89
commit 3a69be4
Showing
2 changed files
with
70 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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