mirror of
https://github.com/hanzoai/postcss.git
synced 2026-09-24 17:01:56 +00:00
20 lines
480 B
TypeScript
Executable File
20 lines
480 B
TypeScript
Executable File
import { test } from 'uvu'
|
|
import { is } from 'uvu/assert'
|
|
|
|
import { Comment, parse } from '../lib/postcss.js'
|
|
|
|
test('toString() inserts default spaces', () => {
|
|
let comment = new Comment({ text: 'hi' })
|
|
is(comment.toString(), '/* hi */')
|
|
})
|
|
|
|
test('toString() clones spaces from another comment', () => {
|
|
let root = parse('a{} /*hello*/')
|
|
let comment = new Comment({ text: 'world' })
|
|
root.append(comment)
|
|
|
|
is(root.toString(), 'a{} /*hello*/ /*world*/')
|
|
})
|
|
|
|
test.run()
|