Skip to content

Commit

Permalink
Changing the tests
Browse files Browse the repository at this point in the history
Added a test to check the work with comments

The existing tests have been changed because they contained incorrect data.
  • Loading branch information
Ulyanov-programmer committed Oct 15, 2024
1 parent f40dfa6 commit 107d65d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -605,17 +605,21 @@ test('clears empty selector after comma', () => {
})

test('moves comment with rule', () => {
run('a { /*B*/ /*B2*/ b {} }', '/*B*/ /*B2*/ a b {}')
run('a { /*B*/ /*B2*/ b {} }', 'a { /*B*/ /*B2*/ } a b {}')
})

test('moves comment with at-rule', () => {
run('a { /*B*/ @media { one: 1 } }', '/*B*/ @media {a { one: 1 } }')
run('a { /*B*/ @media { one: 1 } }', 'a { /*B*/ } @media {a { one: 1 } }')
})

test('moves comment with declaration', () => {
run('a { @media { /*B*/ one: 1 } }', '@media {a { /*B*/ one: 1 } }')
})

test('moves comment with declaration without properties', () => {
run('a { @media { /*B*/ } }', '@media {a { /*B*/ } }')
})

test('saves order of rules', () => {
run('.one { & .two {} & .tree {} }', '.one .two {} .one .tree {}')
})
Expand Down

0 comments on commit 107d65d

Please sign in to comment.