Skip to content

Commit

Permalink
Fix: lib/config.js tests pass if personal config exists (fixes #6559) (
Browse files Browse the repository at this point in the history
  • Loading branch information
platinumazure authored and gyandeeps committed Jul 1, 2016
1 parent 4c05967 commit 7988427
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,11 @@ describe("Config", function() {

it("should throw an error when an invalid path is given", function() {
var configPath = path.resolve(__dirname, "..", "fixtures", "configurations", "foobaz", ".eslintrc");
var configHelper = new Config({cwd: process.cwd()});
var homePath = "does-not-exist";

var StubbedConfig = proxyquire("../../lib/config", { "user-home": homePath });

var configHelper = new StubbedConfig({cwd: process.cwd()});

sandbox.stub(fs, "readdirSync").throws(new Error());

Expand Down

0 comments on commit 7988427

Please sign in to comment.