How to access files during tests


During my tests I want to check if all .json files in a directory are valid JSON. But no matter what I’m trying I cannot get it to work. This is my test code:

describe(‘Json’, function(done) {
it(‘should be valid JSON’, function(done) {
var folder = ‘…/data/’;
… //throws error: Error: ENOENT: no such file or directory, scandir ‘…/data/’

The test file is in folder/xxx.test.js and the data directory with the json files exists. It seems like meteor compiles the app before starting the test, and then the directory doesn’t exist anymore.

How can I access these files during tests?

//EDIT: I’m running the test like so:
meteor test --once --driver-package dispatch:mocha-phantomjs

Regards, Fabian