|
| 1 | +var Comb = require('../lib/csscomb'); |
| 2 | +var assert = require('assert'); |
| 3 | + |
| 4 | +describe('csscomb methods', function() { |
| 5 | + var comb = new Comb(); |
| 6 | + |
| 7 | + it('getConfig()', function() { |
| 8 | + var config = require('../config/csscomb.json'); |
| 9 | + |
| 10 | + assert.equal(comb.getConfig(), config); |
| 11 | + }); |
| 12 | + |
| 13 | + it('getConfig(number)', function() { |
| 14 | + assert.throws(function() { |
| 15 | + comb.getConfig(16); |
| 16 | + }); |
| 17 | + }); |
| 18 | + |
| 19 | + it('getConfig(boolean)', function() { |
| 20 | + assert.throws(function() { |
| 21 | + comb.getConfig(true); |
| 22 | + }); |
| 23 | + }); |
| 24 | + |
| 25 | + it('getConfig(empty string)', function() { |
| 26 | + var config = require('../config/csscomb.json'); |
| 27 | + |
| 28 | + assert.equal(comb.getConfig(''), config); |
| 29 | + }); |
| 30 | + |
| 31 | + it('getConfig(invalid string)', function() { |
| 32 | + assert.throws(function() { |
| 33 | + comb.getConfig('nani'); |
| 34 | + }); |
| 35 | + }); |
| 36 | + |
| 37 | + it('getConfig(csscomb)', function() { |
| 38 | + var config = require('../config/csscomb.json'); |
| 39 | + |
| 40 | + assert.equal(comb.getConfig('csscomb'), config); |
| 41 | + }); |
| 42 | + |
| 43 | + it('getConfig(zen)', function() { |
| 44 | + var config = require('../config/zen.json'); |
| 45 | + |
| 46 | + assert.equal(comb.getConfig('zen'), config); |
| 47 | + }); |
| 48 | + |
| 49 | + it('getConfig(yandex)', function() { |
| 50 | + var config = require('../config/yandex.json'); |
| 51 | + |
| 52 | + assert.equal(comb.getConfig('yandex'), config); |
| 53 | + }); |
| 54 | +}); |
0 commit comments