1 | describe('Plugin', function() {
|
2 | var plugin;
|
3 |
|
4 | beforeEach(function() {
|
5 | plugin = new Plugin({});
|
6 | });
|
7 |
|
8 | it('should be an object', function() {
|
9 | expect(plugin).to.be.ok;
|
10 | });
|
11 |
|
12 | it('should has #minify method', function() {
|
13 | expect(plugin.minify).to.be.an.instanceof(Function);
|
14 | });
|
15 |
|
16 | it('should compile and produce valid result', function(done) {
|
17 | var content = '#first { font-size: 14px; color: #b0b; }';
|
18 | var expected = '#first{font-size:14px;color:#b0b}';
|
19 |
|
20 | plugin.minify(content, '', function(error, data) {
|
21 | expect(error).not.to.be.ok;
|
22 | expect(data).to.equal(expected);
|
23 | done();
|
24 | });
|
25 | });
|
26 | });
|