Skip to content
This repository was archived by the owner on Mar 23, 2024. It is now read-only.

Commit

Permalink
requireSpaceBeforeKeywords: add specific test for function keyword
Browse files Browse the repository at this point in the history
Ref #2135
  • Loading branch information
qfox committed Feb 15, 2016
1 parent 3d4e05a commit 494505a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/specs/rules/require-space-before-keywords.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,12 @@ describe('rules/require-space-before-keywords', function() {
checker.checkString('if (typeof value !== "function") {}')
).to.have.no.errors();
});

it('should report `function` keyword if it passed explicitly (#2135)', function() {
checker.configure({ requireSpaceBeforeKeywords: ['function'] });

expect(
checker.checkString('module.exports=function() {}')
).to.have.one.validation.error.from('requireSpaceBeforeKeywords');
});
});

0 comments on commit 494505a

Please sign in to comment.