Skip to content

Commit

Permalink
add tests with throwing cage for missing jsdoc scopes
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexej Yaroshevich committed Nov 10, 2014
1 parent c84f5f8 commit 0230100
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/lib/rules/validate-jsdoc/check-redundant-access.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ describe('rules/validate-jsdoc', function () {
checker.cases([
/* jshint ignore:start */
{
it: 'should not throw',
code: function() {
function yay(yey) {
}
}

}, {
it: 'should report confusing multiaccess',
errors: 1,
code: function () {
Expand Down
7 changes: 7 additions & 0 deletions test/lib/rules/validate-jsdoc/check-redundant-returns.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ describe('rules/validate-jsdoc', function () {
checker.cases([
/* jshint ignore:start */
{
it: 'should not throw',
code: function() {
function yay(yey) {
}
}

}, {
it: 'should report redundant @returns for function',
errors: 3,
code: function () {
Expand Down
7 changes: 7 additions & 0 deletions test/lib/rules/validate-jsdoc/check-return-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ describe('rules/validate-jsdoc', function () {
checker.cases([
/* jshint ignore:start */
{
it: 'should not throw',
code: function() {
function yay(yey) {
}
}

}, {
it: 'should throw invalid type',
errors: 1,
code: function () {
Expand Down
7 changes: 7 additions & 0 deletions test/lib/rules/validate-jsdoc/check-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ describe('rules/validate-jsdoc', function() {
checker.cases([
/* jshint ignore:start */
{
it: 'should not throw',
code: function() {
function yay(yey) {
}
}

}, {
it: 'should report invalid typedef',
errors: 1,
code: function() {
Expand Down
7 changes: 7 additions & 0 deletions test/lib/rules/validate-jsdoc/leading-underscore-access.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ describe('rules/validate-jsdoc', function () {
checker.cases([
/* jshint ignore:start */
{
it: 'should not throw',
code: function() {
function yay(yey) {
}
}

}, {
it: 'should report enforcing @private on leading underscores',
rules: {leadingUnderscoreAccess: 'private'},
errors: 1,
Expand Down
7 changes: 7 additions & 0 deletions test/lib/rules/validate-jsdoc/require-param-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ describe('rules/validate-jsdoc', function () {
checker.cases([
/* jshint ignore:start */
{
it: 'should not throw',
code: function() {
function yay(yey) {
}
}

}, {
it: 'should report missing jsdoc-param type for function',
errors: 1,
code: function () {
Expand Down
7 changes: 7 additions & 0 deletions test/lib/rules/validate-jsdoc/require-return-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ describe('rules/validate-jsdoc', function () {
checker.cases([
/* jshint ignore:start */
{
it: 'should not throw',
code: function() {
function yay(yey) {
}
}

}, {
it: 'should report invalid @returns',
errors: 1,
code: function() {
Expand Down

0 comments on commit 0230100

Please sign in to comment.