Permalink
Browse files

There were failing lib/hint tests that needed to be fixed.

  • Loading branch information...
1 parent 3a6f531 commit d0911a068e8aca78aa20aa00b9739ab574eef9ff @brentlintner brentlintner committed Aug 30, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/hint.js
  2. +1 −1 test/unit/hint.js
View
2 lib/hint.js
@@ -13,7 +13,7 @@ function _lint(file, results, config, data) {
lintdata;
// config may be a pointer, but we modify it below, which changes it the next time it is used.
- config = Object.keys(config).reduce(function (obj, key) {
+ config = !config ? {} : Object.keys(config).reduce(function (obj, key) {
obj[key] = config[key];
return obj;
}, {});
View
2 test/unit/hint.js
@@ -106,7 +106,7 @@ describe("hint", function () {
hint.hint(targets, config);
- expect(jshint.JSHINT).toHaveBeenCalledWith("data", config);
+ expect(jshint.JSHINT).toHaveBeenCalledWith("data", config, undefined);
});
it("uses custom reporter", function () {

0 comments on commit d0911a0

Please sign in to comment.