Skip to content

Commit

Permalink
feat: enable more test
Browse files Browse the repository at this point in the history
  • Loading branch information
darkskygit committed Sep 4, 2024
1 parent 78f8549 commit 9a3ce67
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
3 changes: 1 addition & 2 deletions y-octo-node/tests/yjs/y-array.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@ test.skip("testDeleteInsert", (t) => {
compare(users);
});

// TODO: impl sync protocol encode in rust
test.skip("testInsertThreeElementsTryRegetProperty", (t) => {
test("testInsertThreeElementsTryRegetProperty", (t) => {
const { testConnector, users, array0, array1 } = init(gen, { users: 2 });

array0.insert(0, [1, true, false]);
Expand Down
11 changes: 5 additions & 6 deletions y-octo-node/tests/yjs/y-map.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ test("testSizeAndDeleteOfMapProperty", (t) => {
testConnector.disconnectAll();
});

test.skip("testGetAndSetAndDeleteOfMapProperty", (t) => {
test("testGetAndSetAndDeleteOfMapProperty", (t) => {
const { testConnector, users, map0, map1 } = init(gen, { users: 3 });

map0.set("stuff", "c0");
Expand All @@ -268,10 +268,9 @@ test.skip("testGetAndSetAndDeleteOfMapProperty", (t) => {
testConnector.flushAllMessages();
for (const user of users) {
const u = user.getOrCreateMap("map");
t.assert(u.get("stuff") === undefined);
t.is(u.get("stuff"), null);
}
compare(users);
testConnector.disconnectAll()
});

test.skip("testSetAndClearOfMapProperties", (t) => {
Expand All @@ -283,9 +282,9 @@ test.skip("testSetAndClearOfMapProperties", (t) => {
testConnector.flushAllMessages();
for (const user of users) {
const u = user.getOrCreateMap("map");
t.assert(u.get("stuff") === undefined);
t.assert(u.get("otherstuff") === undefined);
t.assert(u.size === 0, `map size after clear is ${u.size}, expected 0`);
t.is(u.get("stuff"), null);
t.is(u.get("otherstuff"), null);
t.is(u.size, 0, `map size after clear is ${u.size}, expected 0`);
}
compare(users);
});
Expand Down

0 comments on commit 9a3ce67

Please sign in to comment.