I'm using this DDP client to run Cucumber tests. In between my tests I close the connection and reopen it, in between which ddp.collections is not cleaned. This results in the same documents getting pushed into it multiple times.
I currently solve this by doing:
ddp.close();
ddp.collections = {};