Skip to content

Commit

Permalink
Misc: update jscs and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexej Yaroshevich committed Sep 6, 2015
1 parent 43bfdeb commit 8ba3eaf
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
* @param {module:jscs/lib/Configuration} configuration
*/
module.exports = function(configuration) {
delete configuration._rules.jsDoc;
configuration.registerRule(require('./rules/validate-jsdoc'));
};
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
},
"devDependencies": {
"chai": "^2.3.0",
"jscs": "^1.13.1",
"chai-subset": "^1.1.0",
"jscs": "^2.1.1",
"jshint": "^2.7.0",
"mocha": "^2.2.4"
},
Expand Down
4 changes: 3 additions & 1 deletion test/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ var parse = require('comment-parser');
var chai = require('chai');
var expect = chai.expect;

chai.use(require('chai-subset'));

global.parse = parse;
global.fnBody = fnBody;
global.checker = rulesChecker;
Expand Down Expand Up @@ -110,7 +112,7 @@ function rulesChecker(opts) {
.to.eq(test.errors || 0);
} else if (Array.isArray(test.errors)) {
expect(errors)
.to.deep.equal(test.errors);
.to.containSubset(test.errors);
} else {
expect(checked.getErrorCount())
.to.not.eq(0);
Expand Down
2 changes: 1 addition & 1 deletion test/lib/rules/validate-jsdoc/check-annotations.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
describe('lib/rules/validate-jsdoc/check-annotations', function() {
var checker = global.checker({
additionalRules: ['lib/rules/validate-jsdoc.js']
plugins: ['.']
});

describe('with true', function() {
Expand Down
2 changes: 1 addition & 1 deletion test/lib/rules/validate-jsdoc/check-redundant-params.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
describe('lib/rules/validate-jsdoc/check-redundant-params', function () {
var checker = global.checker({
plugins: ['./lib/index']
plugins: ['.']
});

describe('not configured', function() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
describe('lib/rules/validate-jsdoc/disallow-newline-after-description', function () {
var checker = global.checker({
additionalRules: ['lib/rules/validate-jsdoc.js']
plugins: ['.']
});

describe('not configured', function() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
describe('lib/rules/validate-jsdoc/require-description-complete-sentence', function () {
var checker = global.checker({
additionalRules: ['lib/rules/validate-jsdoc.js']
plugins: ['.']
});

describe('not configured', function() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
describe('lib/rules/validate-jsdoc/require-hyphen-before-description', function () {
var checker = global.checker({
additionalRules: ['lib/rules/validate-jsdoc.js']
plugins: ['.']
});

describe('not configured', function() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
describe('lib/rules/validate-jsdoc/require-newline-after-description', function () {
var checker = global.checker({
additionalRules: ['lib/rules/validate-jsdoc.js']
plugins: ['.']
});

describe('not configured', function() {
Expand Down

0 comments on commit 8ba3eaf

Please sign in to comment.