Skip to content

Commit

Permalink
Fix eslint errors in test/kss_modifier.js.
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnAlbin committed Jun 22, 2015
1 parent 04e9e10 commit 7cce4a1
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions test/kss_modifier.js
@@ -1,15 +1,18 @@
var kss = require('../index.js'),
KssStyleguide = kss.KssStyleguide,
KssSection = kss.KssSection,
KssModifier = kss.KssModifier,
/*global suite*/

path = require('path'),
var kss = require('../index.js'),
assert = require('assert'),
common = require('./common.js'),
path = require('path');

styleDirectory = path.normalize(__dirname + '/fixtures-styles/'),
common = require('./common.js')(styleDirectory);
var KssModifier = kss.KssModifier,
styleDirectory = path.join(__dirname, '/fixtures-styles/');

common = common(styleDirectory);

suite('KssModifier', function() {
'use strict';

common.hasMethod(new KssModifier({}), 'name');
common.hasMethod(new KssModifier({}), 'description');
common.hasMethod(new KssModifier({}), 'className');
Expand All @@ -19,7 +22,7 @@ suite('KssModifier', function() {
common.testAllSections('should return data.name', '*.less|*.css', function(section) {
var modifiers = section.modifiers(),
i, l = modifiers.length;

for (i = 0; i < l; i += 1) {
assert.equal(modifiers[i].data.name, modifiers[i].name());
}
Expand All @@ -29,7 +32,7 @@ suite('KssModifier', function() {
common.testAllSections('should return data.description', '*.less|*.css', function(section) {
var modifiers = section.modifiers(),
i, l = modifiers.length;

for (i = 0; i < l; i += 1) {
assert.equal(modifiers[i].data.description, modifiers[i].description());
}
Expand All @@ -40,7 +43,7 @@ suite('KssModifier', function() {
var modifiers = section.modifiers(),
i, l = modifiers.length;

for (i = 0; i < l; i+= 1) {
for (i = 0; i < l; i += 1) {
assert.ok(modifiers[i].className().match(/[a-z \-_]/gi));
}
});
Expand All @@ -52,7 +55,9 @@ suite('KssModifier', function() {
i, l = modifiers.length;

for (i = 0; i < l; i += 1) {
if (!modifiers[i].markup()) continue;
if (!modifiers[i].markup()) {
continue;
}

assert.equal(section.data.markup, modifiers[i].data.section.data.markup);
assert.equal(section.data.markup, modifiers[i].markup());
Expand Down

0 comments on commit 7cce4a1

Please sign in to comment.