Skip to content
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

feat: impl toJSON for LoroTreeNode #538

Merged
merged 2 commits into from
Nov 5, 2024
Merged

Conversation

Leeeon233
Copy link
Member

No description provided.

@Leeeon233 Leeeon233 requested a review from zxch3n November 5, 2024 08:53
@@ -222,6 +222,28 @@ describe("loro tree node", () => {
unsub()
assertEquals(child2.parent()!.id, child.id);
});

it("toJSON", () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels like a good place to use snapshot tests. https://vitest.dev/guide/snapshot

It'll be better to also have some tests for attached LoroTree

@Leeeon233 Leeeon233 merged commit 468a957 into main Nov 5, 2024
1 check passed
@Leeeon233 Leeeon233 deleted the feat-tree-node-to-json-loro-1018 branch November 5, 2024 12:11
rteqs pushed a commit to rteqs/loro that referenced this pull request Nov 13, 2024
* feat: impl `toJSON` for  `LoroTreeNode`
* test: add snapshot test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants