added test case
This commit is contained in:
parent
bf4d5f24a8
commit
79ec71d559
@ -84,6 +84,30 @@ describe("Yjs (basic)", function(){
|
|||||||
u.transact(transaction);
|
u.transact(transaction);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
it("Basic get&set of Map property (handle three conflicts)", function(){
|
||||||
|
var y = this.users[0];
|
||||||
|
y.connector.flushAll();
|
||||||
|
this.users[0].transact(function*(root){
|
||||||
|
yield* root.val("stuff", "c0");
|
||||||
|
});
|
||||||
|
this.users[1].transact(function*(root){
|
||||||
|
yield* root.val("stuff", "c1");
|
||||||
|
});
|
||||||
|
this.users[2].transact(function*(root){
|
||||||
|
yield* root.val("stuff", "c2");
|
||||||
|
});
|
||||||
|
this.users[3].transact(function*(root){
|
||||||
|
yield* root.val("stuff", "c3");
|
||||||
|
});
|
||||||
|
y.connector.flushAll();
|
||||||
|
var transaction = function*(root){
|
||||||
|
expect(yield* root.val("stuff")).toEqual("c0");
|
||||||
|
};
|
||||||
|
|
||||||
|
for (var key in this.users) {
|
||||||
|
var u = this.users[key];
|
||||||
|
u.transact(transaction);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user