Files
postcss/test/comment.js
T
2015-02-14 13:23:49 +03:00

26 lines
630 B
JavaScript

import Comment from '../lib/comment';
import parse from '../lib/parse';
import { expect } from 'chai';
describe('Comment', () => {
describe('toString()', () => {
it('inserts default spaces', () => {
var comment = new Comment({ text: 'hi' });
expect(comment.toString()).to.eql('/* hi */');
});
it('clone spaces from another comment', () => {
var root = parse('a{} /*hello*/');
var comment = new Comment({ text: 'world' });
root.append(comment);
expect(comment.toString()).to.eql(' /*world*/');
});
});
});