Skip to content

Commit e317b03

Browse files
committed
rules: change test case wording to be consistent
1 parent b7dd13e commit e317b03

11 files changed

+45
-55
lines changed

test/lib/rules/validate-jsdoc/check-param-names.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ describe('lib/rules/validate-jsdoc/check-param-names', function () {
33
additionalRules: ['lib/rules/validate-jsdoc.js']
44
});
55

6-
describe('configured', function() {
6+
describe('not configured', function() {
77

8-
it('with undefined should throws', function() {
8+
it('should report with undefined', function() {
99
global.expect(function() {
1010
checker.configure({checkParamNames: undefined});
1111
}).to.throws(/accepted value/i);
1212
});
1313

14-
it('with undefined should throws', function() {
14+
it('should report with an object', function() {
1515
global.expect(function() {
1616
checker.configure({checkParamNames: {}});
1717
}).to.throws(/accepted value/i);
@@ -25,7 +25,7 @@ describe('lib/rules/validate-jsdoc/check-param-names', function () {
2525
checker.cases([
2626
/* jshint ignore:start */
2727
{
28-
it: 'should not throw',
28+
it: 'should not report',
2929
code: function() {
3030
function yay(yey) {
3131
}
@@ -37,7 +37,6 @@ describe('lib/rules/validate-jsdoc/check-param-names', function () {
3737
function yey(yay) {
3838
}
3939
}
40-
4140
}, {
4241
it: 'should report invalid jsdoc',
4342
code: function () {

test/lib/rules/validate-jsdoc/check-redundant-access.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ describe('lib/rules/validate-jsdoc/check-redundant-access', function () {
33
additionalRules: ['lib/rules/validate-jsdoc.js']
44
});
55

6-
describe('configured', function() {
6+
describe('not configured', function() {
77

8-
it('with undefined should throws', function() {
8+
it('should report with undefined', function() {
99
global.expect(function() {
1010
checker.configure({checkRedundantAccess: undefined});
1111
}).to.throws(/accepted value/i);
1212
});
1313

14-
it('with undefined should throws', function() {
14+
it('should report with an object', function() {
1515
global.expect(function() {
1616
checker.configure({checkRedundantAccess: {}});
1717
}).to.throws(/accepted value/i);
@@ -25,12 +25,11 @@ describe('lib/rules/validate-jsdoc/check-redundant-access', function () {
2525
checker.cases([
2626
/* jshint ignore:start */
2727
{
28-
it: 'should not throw',
28+
it: 'should not report',
2929
code: function() {
3030
function yay(yey) {
3131
}
3232
}
33-
3433
}, {
3534
it: 'should report confusing multiaccess',
3635
errors: 1,

test/lib/rules/validate-jsdoc/check-redundant-params.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ describe('lib/rules/validate-jsdoc/check-redundant-params', function () {
33
additionalRules: ['lib/rules/validate-jsdoc.js']
44
});
55

6-
describe('configured', function() {
6+
describe('not configured', function() {
77

8-
it('with undefined should throws', function() {
8+
it('should report with undefined', function() {
99
global.expect(function() {
1010
checker.configure({checkRedundantParams: undefined});
1111
}).to.throws(/accepted value/i);
1212
});
1313

14-
it('with undefined should throws', function() {
14+
it('should report with an object', function() {
1515
global.expect(function() {
1616
checker.configure({checkRedundantParams: {}});
1717
}).to.throws(/accepted value/i);
@@ -25,12 +25,11 @@ describe('lib/rules/validate-jsdoc/check-redundant-params', function () {
2525
checker.cases([
2626
/* jshint ignore:start */
2727
{
28-
it: 'should not throw',
28+
it: 'should not report',
2929
code: function() {
3030
function yay(yey) {
3131
}
3232
}
33-
3433
}, {
3534
it: 'should report redundant jsdoc-param for function',
3635
errors: 1,

test/lib/rules/validate-jsdoc/check-redundant-returns.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ describe('lib/rules/validate-jsdoc/check-redundant-returns', function () {
33
additionalRules: ['lib/rules/validate-jsdoc.js']
44
});
55

6-
describe('configured', function() {
6+
describe('not configured', function() {
77

8-
it('with undefined should throws', function() {
8+
it('should report with undefined', function() {
99
global.expect(function() {
1010
checker.configure({checkRedundantReturns: undefined});
1111
}).to.throws(/accepted value/i);
1212
});
1313

14-
it('with undefined should throws', function() {
14+
it('should report with an object', function() {
1515
global.expect(function() {
1616
checker.configure({checkRedundantReturns: {}});
1717
}).to.throws(/accepted value/i);
@@ -25,12 +25,11 @@ describe('lib/rules/validate-jsdoc/check-redundant-returns', function () {
2525
checker.cases([
2626
/* jshint ignore:start */
2727
{
28-
it: 'should not throw',
28+
it: 'should not report',
2929
code: function() {
3030
function yay(yey) {
3131
}
3232
}
33-
3433
}, {
3534
it: 'should report redundant @returns for function',
3635
errors: 3,

test/lib/rules/validate-jsdoc/check-return-types.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ describe('lib/rules/validate-jsdoc/check-return-types', function () {
33
additionalRules: ['lib/rules/validate-jsdoc.js']
44
});
55

6-
describe('configured', function() {
6+
describe('not configured', function() {
77

8-
it('with undefined should throws', function() {
8+
it('should report with undefined', function() {
99
global.expect(function() {
1010
checker.configure({checkReturnTypes: undefined});
1111
}).to.throws(/accepted value/i);
1212
});
1313

14-
it('with undefined should throws', function() {
14+
it('should report with an object', function() {
1515
global.expect(function() {
1616
checker.configure({checkReturnTypes: {}});
1717
}).to.throws(/accepted value/i);
@@ -25,14 +25,13 @@ describe('lib/rules/validate-jsdoc/check-return-types', function () {
2525
checker.cases([
2626
/* jshint ignore:start */
2727
{
28-
it: 'should not throw',
28+
it: 'should not report',
2929
code: function() {
3030
function yay(yey) {
3131
}
3232
}
33-
3433
}, {
35-
it: 'should throw invalid type',
34+
it: 'should report invalid type',
3635
errors: 1,
3736
code: function () {
3837
/**
@@ -43,7 +42,7 @@ describe('lib/rules/validate-jsdoc/check-return-types', function () {
4342
}
4443
}
4544
}, {
46-
it: 'should neither throw nor report',
45+
it: 'should not report',
4746
code: function () {
4847
/**
4948
* @return {{a: number, b: string}}

test/lib/rules/validate-jsdoc/check-types.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ describe('lib/rules/validate-jsdoc/check-types', function() {
33
additionalRules: ['lib/rules/validate-jsdoc.js']
44
});
55

6-
describe('configured', function() {
6+
describe('not configured', function() {
77

8-
it('with undefined should throws', function() {
8+
it('should report with undefined', function() {
99
global.expect(function() {
1010
checker.configure({checkTypes: undefined});
1111
}).to.throws(/accepted value/i);
1212
});
1313

14-
it('with undefined should throws', function() {
14+
it('should report with an object', function() {
1515
global.expect(function() {
1616
checker.configure({checkTypes: {}});
1717
}).to.throws(/accepted value/i);
@@ -25,12 +25,11 @@ describe('lib/rules/validate-jsdoc/check-types', function() {
2525
checker.cases([
2626
/* jshint ignore:start */
2727
{
28-
it: 'should not throw',
28+
it: 'should not report',
2929
code: function() {
3030
function yay(yey) {
3131
}
3232
}
33-
3433
}, {
3534
it: 'should report invalid typedef',
3635
errors: 1,

test/lib/rules/validate-jsdoc/enforce-existence.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ describe('lib/rules/validate-jsdoc/enforce-existence', function () {
33
additionalRules: ['lib/rules/validate-jsdoc.js']
44
});
55

6-
describe('configured', function() {
6+
describe('not configured', function() {
77

8-
it('with undefined should throws', function() {
8+
it('should report with undefined', function() {
99
global.expect(function() {
1010
checker.configure({enforceExistence: undefined});
1111
}).to.throws(/accepted value/i);
1212
});
1313

14-
it('with undefined should throws', function() {
14+
it('should report with an object', function() {
1515
global.expect(function() {
1616
checker.configure({enforceExistence: {}});
1717
}).to.throws(/accepted value/i);

test/lib/rules/validate-jsdoc/leading-underscore-access.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ describe('lib/rules/validate-jsdoc/leading-underscore-access', function () {
33
additionalRules: ['lib/rules/validate-jsdoc.js']
44
});
55

6-
describe('configured', function() {
6+
describe('not configured', function() {
77

8-
it('with undefined should throws', function() {
8+
it('should report with undefined', function() {
99
global.expect(function() {
1010
checker.configure({leadingUnderscoreAccess: undefined});
1111
}).to.throws(/accepted value/i);
1212
});
1313

14-
it('with object should throws', function() {
14+
it('should report with an object', function() {
1515
global.expect(function() {
1616
checker.configure({leadingUnderscoreAccess: {}});
1717
}).to.throws(/accepted value/i);
@@ -24,13 +24,12 @@ describe('lib/rules/validate-jsdoc/leading-underscore-access', function () {
2424
checker.cases([
2525
/* jshint ignore:start */
2626
{
27-
it: 'should not throw',
27+
it: 'should not report',
2828
rules: {leadingUnderscoreAccess: true},
2929
code: function() {
3030
function yay(yey) {
3131
}
3232
}
33-
3433
}, {
3534
it: 'should report enforcing @private on leading underscores',
3635
rules: {leadingUnderscoreAccess: 'private'},

test/lib/rules/validate-jsdoc/require-hyphen-before-description.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ describe('lib/rules/validate-jsdoc/require-hyphen-before-description', function
33
additionalRules: ['lib/rules/validate-jsdoc.js']
44
});
55

6-
describe('configured', function() {
6+
describe('not configured', function() {
77

8-
it('with undefined should throws', function() {
8+
it('should report with undefined', function() {
99
global.expect(function() {
1010
checker.configure({requireHyphenBeforeDescription: undefined});
1111
}).to.throws(/accepted value/i);
1212
});
1313

14-
it('with undefined should throws', function() {
14+
it('should report with an object', function() {
1515
global.expect(function() {
1616
checker.configure({requireHyphenBeforeDescription: {}});
1717
}).to.throws(/accepted value/i);
@@ -25,7 +25,7 @@ describe('lib/rules/validate-jsdoc/require-hyphen-before-description', function
2525
checker.cases([
2626
/* jshint ignore:start */
2727
{
28-
it: 'should not throw',
28+
it: 'should not report',
2929
code: function() {
3030
function yay(yey) {
3131
}
@@ -36,7 +36,6 @@ describe('lib/rules/validate-jsdoc/require-hyphen-before-description', function
3636
function yey(yay) {
3737
}
3838
}
39-
4039
}, {
4140
it: 'should report invalid description (without a hyphen)',
4241
code: function () {

test/lib/rules/validate-jsdoc/require-param-types.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ describe('lib/rules/validate-jsdoc/require-param-types', function () {
33
additionalRules: ['lib/rules/validate-jsdoc.js']
44
});
55

6-
describe('configured', function() {
6+
describe('not configured', function() {
77

8-
it('with undefined should throws', function() {
8+
it('should report with undefined', function() {
99
global.expect(function() {
1010
checker.configure({requireParamTypes: undefined});
1111
}).to.throws(/accepted value/i);
1212
});
1313

14-
it('with undefined should throws', function() {
14+
it('should report with an object', function() {
1515
global.expect(function() {
1616
checker.configure({requireParamTypes: {}});
1717
}).to.throws(/accepted value/i);
@@ -25,12 +25,11 @@ describe('lib/rules/validate-jsdoc/require-param-types', function () {
2525
checker.cases([
2626
/* jshint ignore:start */
2727
{
28-
it: 'should not throw',
28+
it: 'should not report',
2929
code: function() {
3030
function yay(yey) {
3131
}
3232
}
33-
3433
}, {
3534
it: 'should report missing jsdoc-param type for function',
3635
errors: 1,

0 commit comments

Comments
 (0)