Skip to content

Commit

Permalink
upgrade csstree to v3 (#91)
Browse files Browse the repository at this point in the history
closes #89
  • Loading branch information
bartveneman authored Sep 13, 2024
1 parent a11ba5a commit 27ee720
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 15 deletions.
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"vite-plugin-dts": "^4.0.0-beta.1"
},
"dependencies": {
"css-tree": "^2.3.1"
"css-tree": "^3.0.0"
},
"files": [
"dist"
Expand Down
6 changes: 0 additions & 6 deletions test/rules.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,6 @@ test('no trailing newline on empty nested rule', () => {
assert.equal(actual, expected)
})

test('formats Raw rule prelude', () => {
let actual = format(`:lang("nl","de"),li:nth-child() {}`)
let expected = `:lang("nl","de"),li:nth-child() {}` // no formatting applied
assert.equal(actual, expected)
})

test('formats nested rules with selectors starting with', () => {
let actual = format(`
selector {
Expand Down
8 changes: 8 additions & 0 deletions test/selectors.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,12 @@ test('adds a space before attribute selector flags', () => {
[title="foo" i] {}`
assert.is(actual, expected)
})

test('formats :lang correctly', () => {
let actual = format(`:lang("nl","de"),li:nth-child() {}`)
let expected = `:lang("nl","de"),
li:nth-child() {}`
assert.equal(actual, expected)
})

test.run()

0 comments on commit 27ee720

Please sign in to comment.