   CircularFirsts.remove {}
   CircularSeconds.remove {}
   Recursives.remove {}
+  IdentityGenerators.remove {}
   Meteor.users.remove {}
 
   Meteor.publish null, ->

  firstReferenceB = Posts
  Document._retryDelayed()

  test.equal Document.Meta.list, [UserLink, PostLink, CircularSecond, Person, CircularFirst, Recursive, Post, Second, First]
  test.equal Document.Meta.delayed.length, 1
  test.equal Document.Meta.delayed[0][0], Third


  , /Reference field directly in an array cannot be optional/

  # Invalid document should not be added to the list
  test.equal Document.Meta.list, [UserLink, PostLink, CircularSecond, Person, CircularFirst, Recursive, Post, IdentityGenerator]

Tinytest.add 'meteor-peerdb - invalid nested arrays', (test) ->
  test.throws ->
