forked from csscomb/csscomb.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request csscomb#147 from csscomb/tg/test-helpers
Tests: Add helpers
- Loading branch information
Showing
208 changed files
with
1,132 additions
and
1,734 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
var assert = require('assert'); | ||
|
||
describe('csscomb methods', function() { | ||
it('getConfig()', function() { | ||
var config = require('../../config/csscomb.json'); | ||
|
||
assert.equal(this.comb.getConfig(), config); | ||
}); | ||
|
||
it('getConfig(number)', function() { | ||
assert.throws(function() { | ||
this.comb.getConfig(16); | ||
}); | ||
}); | ||
|
||
it('getConfig(boolean)', function() { | ||
assert.throws(function() { | ||
this.comb.getConfig(true); | ||
}); | ||
}); | ||
|
||
it('getConfig(empty string)', function() { | ||
var config = require('../../config/csscomb.json'); | ||
|
||
assert.equal(this.comb.getConfig(''), config); | ||
}); | ||
|
||
it('getConfig(invalid string)', function() { | ||
assert.throws(function() { | ||
this.comb.getConfig('nani'); | ||
}); | ||
}); | ||
|
||
it('getConfig(csscomb)', function() { | ||
var config = require('../../config/csscomb.json'); | ||
|
||
assert.equal(this.comb.getConfig('csscomb'), config); | ||
}); | ||
|
||
it('getConfig(zen)', function() { | ||
var config = require('../../config/zen.json'); | ||
|
||
assert.equal(this.comb.getConfig('zen'), config); | ||
}); | ||
|
||
it('getConfig(yandex)', function() { | ||
var config = require('../../config/yandex.json'); | ||
|
||
assert.equal(this.comb.getConfig('yandex'), config); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
describe('LESS', function() { | ||
beforeEach(function() { | ||
this.filename = __filename; | ||
this.comb.configure({}); | ||
}); | ||
|
||
it('Should parse nested rules', function() { | ||
this.shouldBeEqual('nested-rule.less'); | ||
}); | ||
|
||
it('Should parse operations', function() { | ||
this.shouldBeEqual('operation.less'); | ||
}); | ||
|
||
it('Should parse parent selector &', function() { | ||
this.shouldBeEqual('parent-selector.less'); | ||
}); | ||
|
||
it('Should parse variables', function() { | ||
this.shouldBeEqual('variable.less'); | ||
}); | ||
|
||
it('Should parse interpolated variables inside selectors', function() { | ||
this.shouldBeEqual('interpolated-variable-1.less'); | ||
}); | ||
|
||
it('Should parse interpolated variables inside values', function() { | ||
this.shouldBeEqual('interpolated-variable-2.less'); | ||
}); | ||
|
||
it('Should parse @import', function() { | ||
this.shouldBeEqual('import.less'); | ||
}); | ||
|
||
it('Should parse included mixins', function() { | ||
this.shouldBeEqual('mixin.less'); | ||
}); | ||
|
||
it('Should parse nested @media', function() { | ||
this.shouldBeEqual('nested-media.less'); | ||
}); | ||
}); |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.