fix tests

This commit is contained in:
Kevin Jahns 2018-05-23 14:16:54 +02:00
parent cccc0e1015
commit 4ef36ab81c
2 changed files with 6 additions and 2 deletions

View File

@ -103,6 +103,7 @@ test('Basic get&set of Map property (handle conflict)', async function map6 (t)
map0.set('stuff', 'c0') map0.set('stuff', 'c0')
map1.set('stuff', 'c1') map1.set('stuff', 'c1')
await flushAll(t, users)
await flushAll(t, users) await flushAll(t, users)
for (let user of users) { for (let user of users) {
@ -118,6 +119,7 @@ test('Basic get&set&delete of Map property (handle conflict)', async function ma
map0.delete('stuff') map0.delete('stuff')
map1.set('stuff', 'c1') map1.set('stuff', 'c1')
await flushAll(t, users) await flushAll(t, users)
await flushAll(t, users)
for (let user of users) { for (let user of users) {
var u = user.get('map', Y.Map) var u = user.get('map', Y.Map)
t.assert(u.get('stuff') === undefined) t.assert(u.get('stuff') === undefined)
@ -132,6 +134,7 @@ test('Basic get&set of Map property (handle three conflicts)', async function ma
map1.set('stuff', 'c2') map1.set('stuff', 'c2')
map2.set('stuff', 'c3') map2.set('stuff', 'c3')
await flushAll(t, users) await flushAll(t, users)
await flushAll(t, users)
for (let user of users) { for (let user of users) {
var u = user.get('map', Y.Map) var u = user.get('map', Y.Map)
t.compare(u.get('stuff'), 'c0') t.compare(u.get('stuff'), 'c0')
@ -152,6 +155,7 @@ test('Basic get&set&delete of Map property (handle three conflicts)', async func
map2.set('stuff', 'c2') map2.set('stuff', 'c2')
map3.set('stuff', 'c3') map3.set('stuff', 'c3')
await flushAll(t, users) await flushAll(t, users)
await flushAll(t, users)
for (let user of users) { for (let user of users) {
var u = user.get('map', Y.Map) var u = user.get('map', Y.Map)
t.assert(u.get('stuff') === undefined) t.assert(u.get('stuff') === undefined)

View File

@ -1,5 +1,5 @@
import { wait } from './helper' import { wait } from './helper.mjs'
import { messageToString } from '../src/MessageHandler/messageToString' import { messageToString } from '../src/MessageHandler/messageToString.mjs'
import AbstractConnector from '../src/Connector.mjs' import AbstractConnector from '../src/Connector.mjs'
var rooms = {} var rooms = {}