Skip to content
Permalink
Browse files

Update: Add describe around rule tester blocks (fixes #4907)

  • Loading branch information...
ilyavolodin committed Jan 14, 2016
1 parent 2dba9c7 commit d82eeb11d3a1322347e3366b0f11e6303b0b5461
Showing with 10 additions and 6 deletions.
  1. +10 −6 lib/testers/rule-tester.js
@@ -401,15 +401,19 @@ RuleTester.prototype = {
// this creates a mocha test suite and pipes all supplied info
// through one of the templates above.
RuleTester.describe(ruleName, function() {
test.valid.forEach(function(valid) {
RuleTester.it(valid.code || valid, function() {
testValidTemplate(ruleName, valid);
RuleTester.describe("valid", function() {
test.valid.forEach(function(valid) {
RuleTester.it(valid.code || valid, function() {
testValidTemplate(ruleName, valid);
});
});
});

test.invalid.forEach(function(invalid) {
RuleTester.it(invalid.code, function() {
testInvalidTemplate(ruleName, invalid);
RuleTester.describe("invalid", function() {
test.invalid.forEach(function(invalid) {
RuleTester.it(invalid.code, function() {
testInvalidTemplate(ruleName, invalid);
});
});
});
});

0 comments on commit d82eeb1

Please sign in to comment.
You can’t perform that action at this time.