-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.test.js
62 lines (59 loc) · 1.26 KB
/
index.test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
const { messages, ruleName } = require("./index.js");
testRule({
plugins: ["./index.js"],
ruleName,
config: [
"DEPRECATED_MIXINS",
".myMixin",
"DEPRECATED_STYLES",
".myStyle",
"DEPRECATED_VARIABLES",
"@hello",
],
fix: false,
// accept: [
// {
// code: ".class {}",
// description: "simple class selector"
// },
// {
// code: ".class { .someMixin() }",
// description: "some mixin"
// }
// ],
reject: [
{
code: ".myStyle {}",
// fixed: ".my-class {}",
description: "test",
// message: messages.unexpected(),
// line: 1,
// column: 1,
unfixable: true,
warnings: [
{
message: messages.unexpected(),
line: 1,
column: 1
},
]
},
// {
// code: ".MyClass,\n.MyOtherClass {}",
// fixed: ".my-class,\n.my-other-class {}",
// description: "two pascal class selectors in a selector list",
// warnings: [
// {
// message: messages.unexpected(),
// line: 1,
// column: 1
// },
// {
// message: messages.unexpected(),
// line: 2,
// column: 1
// }
// ]
// }
]
});