mirror of
https://github.com/hanzoai/postcss.git
synced 2026-09-24 17:01:56 +00:00
16 lines
453 B
JavaScript
16 lines
453 B
JavaScript
let Comment = require('../lib/comment')
|
|
let parse = require('../lib/parse')
|
|
|
|
it('toString() inserts default spaces', () => {
|
|
let comment = new Comment({ text: 'hi' })
|
|
expect(comment.toString()).toEqual('/* hi */')
|
|
})
|
|
|
|
it('toString() clones spaces from another comment', () => {
|
|
let root = parse('a{} /*hello*/')
|
|
let comment = new Comment({ text: 'world' })
|
|
root.append(comment)
|
|
|
|
expect(root.toString()).toEqual('a{} /*hello*/ /*world*/')
|
|
})
|