Skip to content

Commit

Permalink
fix: resolver returns traverson object in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-scherzinger committed Jan 27, 2017
1 parent 19703d9 commit 15ba11d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/mocks/resolver.js
@@ -1,15 +1,14 @@
'use strict';

const fs = require('fs');
const path = require('path');
const traverson = require('traverson');

function resolveFile(filePath, obj) {
return new Promise((resolve, reject) => {
fs.readFile(path.resolve(__dirname, filePath), 'utf-8', (err, file) => {
if (err) {
return reject(err);
}
return resolve([JSON.parse(file), obj || {}]); // TODO traversal?
return resolve([JSON.parse(file), obj || traverson.from('http://entrecode.de')]);
});
})
.catch((err) => {
Expand Down

0 comments on commit 15ba11d

Please sign in to comment.