Skip to content

Commit

Permalink
Clean up code
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Jan 31, 2022
1 parent 989361e commit 4f5346e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/parse.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { equal, is, match, not, throws } from 'uvu/assert'
import { testPath, jsonify, eachTest } from 'postcss-parser-tests'
import { readFileSync } from 'fs'
import { resolve } from 'path'
import { test } from 'uvu'
import { equal, is, match, not, throws } from 'uvu/assert'

import { Declaration, AtRule, parse, Root, Rule } from '../lib/postcss.js'

Expand All @@ -21,15 +21,15 @@ eachTest((name, css, json) => {

test('parses UTF-8 BOM', () => {
let css = parse('\uFEFF@host { a {\f} }')
is(css.nodes[0].raws.before, '')
equal(css.nodes[0].raws.before, '')
})

test('should has true at `hasBOM` property', () => {
test('should has true at hasBOM property', () => {
let css = parse('\uFEFF@host { a {\f} }')
is(css.first?.source?.input.hasBOM, true)
})

test('should has false at `hasBOM` property', () => {
test('should has false at hasBOM property', () => {
let css = parse('@host { a {\f} }')
is(css.first?.source?.input.hasBOM, false)
})
Expand Down

0 comments on commit 4f5346e

Please sign in to comment.