Skip to content

Commit

Permalink
fixed cli test (when merging in .jshintrc configs)
Browse files Browse the repository at this point in the history
  • Loading branch information
brentlintner committed May 6, 2011
1 parent 7bb2f6a commit 9931e41
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/cli.js
Expand Up @@ -68,8 +68,12 @@ describe("cli", function () {
path = require('path');

spyOn(fs, "readFileSync").andReturn(JSON.stringify(config));
spyOn(path, "existsSync").andReturn(true);

cli.interpret(["node", "file.js", "file.js"]);
expect(fs.readFileSync).toHaveBeenCalledWith(path.join(process.cwd(), '.jshintrc'), "utf-8");

expect(fs.readFileSync.argsForCall[0]).toEqual([path.join(process.env.HOME, '.jshintrc'), "utf-8"]);
expect(fs.readFileSync.argsForCall[1]).toEqual([path.join(process.cwd(), '.jshintrc'), "utf-8"]);
});

it("overrides options from the $HOME .jshintrc file with options from the cwd .jshintrc file", function () {
Expand Down

0 comments on commit 9931e41

Please sign in to comment.