Skip to content

Commit

Permalink
fix bagpipies for jest
Browse files Browse the repository at this point in the history
  • Loading branch information
Andres Olave authored and theganyo committed Oct 28, 2017
1 parent 090cd44 commit c14ffd2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/fittingTypes/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ module.exports = function createFitting(pipes, fittingDef) {
} catch (err) {
if (err.code !== 'MODULE_NOT_FOUND') { throw err; }
var pathFromError = err.message.match(/'.*?'/)[0];
var split = pathFromError.split(path.sep);
if (split[split.length - 1] === fittingDef.name + "'") {
var fittingIndex = err.message.indexOf(fittingDef.name);
if (err.message[fittingIndex - 1] === path.sep && err.message[fittingDef.name.length] !== path.sep) {
debug('no user fitting %s in %s', fittingDef.name, dir);
} else {
throw err;
Expand Down

0 comments on commit c14ffd2

Please sign in to comment.