meteor-publish-composite
meteor-publish-composite copied to clipboard
Full compatibility with johanbrook:publication-collector
I am using johanbrook:publication-collector for publication testing and noticed a subtle difference:
If I am using a regular publication and the result set does not contain a document, publication-collector results an empty array like this:
{
myCollectionName: []
}
However, if I replace the publication with publish-composite, it returns an empty result:
{
}
This broke my tests. Of course I could workaround this by setting the resulting array to [], but I think there should be consistent behavior for testing and production. I am not sure which side is actually responsible for that difference, i.e. if it is publish-composite or publication-collector. But as publish-composite is actually changing the publication behavior, I think it should take care that other code doesn't see any differences, so I filing the issue here.