   test.isUndefined CircularFirst.Meta._delayed, CircularFirst.Meta._delayed
   test.isUndefined Recursive.Meta._delayed, Recursive.Meta._delayed
   test.isUndefined Post.Meta._delayed, Post.Meta._delayed
+  test.isUndefined IdentityGenerator.Meta._delayed, IdentityGenerator.Meta._delayed
 
   test.isUndefined UserLink.Meta._meta._delayed, UserLink.Meta._meta._delayed
   test.isUndefined PostLink.Meta._meta._delayed, PostLink.Meta._meta._delayed

  , /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]

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

    test.equal intercepted.message, "Not all delayed document definitions were successfully retried: BadPost"
    test.equal intercepted.level, 'error'

    test.equal Document.Meta.list, [UserLink, PostLink, CircularSecond, Person, CircularFirst, Recursive, Post, IdentityGenerator]
    test.equal Document.Meta.delayed.length, 1

    # Clear delayed so that we can retry tests without errors
