Skip to content

Commit 4ae6483

Browse files
committed
More fixing of tests.
1 parent ab70eb5 commit 4ae6483

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

tests.coffee

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ assert.equal Document._delayed.length, 0
77
assert _.isEqual Document.list, []
88
assert _.isEqual Document._collections, {}
99

10-
if Meteor.isServer
11-
globalTestTriggerCounters = {}
10+
globalTestTriggerCounters = {}
1211

1312
class Post extends Document
1413
# Other fields:
@@ -370,15 +369,13 @@ if Meteor.isServer
370369
handles = []
371370
for document in Document.list
372371
do (document) ->
373-
initializing = true
374372
handles.push document.documents.find({}).observeChanges
375373
added: (id, fields) ->
376-
newTimeout() unless initializing
374+
newTimeout()
377375
changed: (id, fields) ->
378376
newTimeout()
379377
removed: (id) ->
380378
newTimeout()
381-
initializing = false
382379
future.wait()
383380
for handle in handles
384381
handle.stop()
@@ -20904,6 +20901,10 @@ testAsyncMulti 'peerdb - bulk insert', [
2090420901

2090520902
# Wait so that observers have time to update documents
2090620903
waitForDatabase test, expect
20904+
,
20905+
(test, expect) ->
20906+
# We sleep a bit so that all changes get to the client, when rnning on the client.
20907+
Meteor.setTimeout expect(), 200
2090720908
,
2090820909
(test, expect) ->
2090920910
docs = Recursive.documents.find(

0 commit comments

Comments
 (0)