Skip to content

Commit 65c1a06

Browse files
committed
增加对@规则筛选功能的测试
1 parent d4caaa4 commit 65c1a06

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

test/index.test.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ it('test cleanSelector', () => {
2525
}
2626
*,:after,:before{
2727
box-sizing:inherit;
28+
}
29+
@media print {
30+
body {
31+
display: block;
32+
}
2833
}`;
2934
const output = ``;
3035
const options = {};
@@ -41,10 +46,19 @@ it('test cleanSelector with options', () => {
4146
}
4247
bbb {
4348
margin: 100px
49+
}
50+
@media screen and (max-width: 300px) {
51+
body {
52+
display: block;
53+
}
4454
}`;
4555
const output = ``;
4656
const options = {
47-
cleanSelector: ['aaa', 'bbb', '*']
57+
cleanSelector: ['aaa', 'bbb', '*'],
58+
cleanAtRule: [{
59+
name: 'media',
60+
params: [/screen/]
61+
}]
4862
};
4963
return run(input, output, options);
5064
});

0 commit comments

Comments
 (0)