Skip to content

Commit

Permalink
Merge pull request #98 from pahen/win
Browse files Browse the repository at this point in the history
Fix failing tests on Windows
  • Loading branch information
pahen authored Aug 22, 2016
2 parents b811754 + e8abb7e commit a1a4433
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lib/tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ class Tree {
absPath = absPath.replace(/\.\w+$/, '');
}

absPath = absPath.replace(/\\/g, '/');

return absPath;
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"mocha": "mocha test/*.js",
"watch": "mocha --watch --growl test/*.js",
"lint": "eslint bin/cli.js lib test/*.js",
"debug": "bin/cli.js --debug bin lib",
"debug": "node bin/cli.js --debug bin lib",
"generate": "npm run generate:small && npm run generate:madge",
"generate:small": "bin/cli.js --image /tmp/simple.svg test/files/cjs/circular/a.js",
"generate:madge": "bin/cli.js --image /tmp/madge.svg bin lib"
Expand Down
2 changes: 1 addition & 1 deletion test/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ describe('Madge', () => {
madge(__dirname + '/files/cjs/a.js', {graphVizPath: '/invalid/path'})
.then((res) => res.image('image.png'))
.catch((err) => {
err.message.should.eql('Could not execute /invalid/path/gvpr -V');
err.message.should.match(/Could not execute .*gvpr \-V/);
done();
});
});
Expand Down

0 comments on commit a1a4433

Please sign in to comment.