I am attempting to run a jasmine-server-integration test in Meteor. I have a snippet which empties out the test DB first rather than keeping the data from the dev database.
I tested that this is working by doing:
posts = Posts.find({}).fetch()
console.log "Posts: ", posts
It returns: Posts: []
As expected. All good so far.
However when I call a method via Meteor.call which returns certain data from the database, it's returning Posts that exist in the dev database rather than returning an empty array from the test database as desired.
Why are Meteor methods not running off of the test db? Is there any way to fix this?
Aucun commentaire:
Enregistrer un commentaire