I'm trying to run some tests on node using karma. I'm running using both phantom and real browsers.
Whichever way I run I get an error on fs read file functions.
'undefined' is not an object (evaluating 'fs.existsSync')
This is even if I have a very simple file like:
var fs = require('fs');
console.error(fs);
var text = fs.readFile('data.txt', 'utf8');
The first console writes out Object {}. The second one gives me the above error. I'm assuming that the object is empty.
I'm using the latest version of karma and dependencies.
Can anybody point me in the right direction as to why the fs object is empty/not working.