mirror of
https://github.com/hanzoai/postcss.git
synced 2026-09-24 17:01:56 +00:00
24 lines
591 B
JavaScript
24 lines
591 B
JavaScript
var Comment = require('../lib/comment');
|
|
var parse = require('../lib/parse');
|
|
|
|
describe('Comment', () => {
|
|
|
|
describe('toString()', () => {
|
|
|
|
it('inserts default spaces', () => {
|
|
var comment = new Comment({ text: 'hi' });
|
|
comment.toString().should.eql('/* hi */');
|
|
});
|
|
|
|
it('clone spaces from another comment', () => {
|
|
var root = parse('/*hello*/');
|
|
var comment = new Comment({ text: 'world' });
|
|
root.append(comment);
|
|
|
|
comment.toString().should.eql('/*world*/');
|
|
});
|
|
|
|
});
|
|
|
|
});
|