Skip to content

Commit

Permalink
fix failing test, delete from cache instead of fs.readFileSync
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasmattheussen committed Aug 23, 2016
1 parent 212f9c1 commit ea6cca6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/loadData.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ module.exports = function(dir) {
var data;

if (ext === '.json' || ext === '.js') {
data = JSON.parse(fs.readFileSync(dataFiles[i]));
delete require.cache[require.resolve(dataFiles[i])];
data = require(dataFiles[i])
}
else if (ext === '.yml') {
data = yaml.safeLoad(fs.readFileSync(dataFiles[i]));
Expand Down

0 comments on commit ea6cca6

Please sign in to comment.