I am using Intern.js to do functional testing and ran into the error in the title. I have no clue how to load json files through FS or through require. I tried everything on Google.
Here's the code in question.
var fs = require('intern/dojo/node!fs')
fs.readFile('./test.json', function (err, data) {
if (err) throw err; // we'll not consider error handling for now
var obj = JSON.parse(data);
});