-
Notifications
You must be signed in to change notification settings - Fork 92
/
index.js
62 lines (59 loc) · 1.13 KB
/
index.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
import rule, { messages, ruleName } from "..";
testRule(rule, {
ruleName,
config: ["always"],
syntax: "scss",
accept: [
{
code: `
$test: ("foo": 14px, "bar": 25px);
`,
description: "accepts strings without quotes"
},
{
code: `
$test: ('foo': 14px, 'bar': 25px);
`,
description: "accepts strings without quotes"
},
{
code: `
$colors: (
250: #eef9ff,
300: #bbe7ff,
350: #b7d3e6,
500: #1388db,
750: #0f6bac,
900: #2e4662
);
`,
description: "accepts numbers"
},
{
code: `
$colors: (
'primary': (
250: #eef9ff,
300: #bbe7ff,
350: #b7d3e6,
500: #1388db,
750: #0f6bac,
900: #2e4662,
)
);
`,
description: "accepts numbers (nested)"
}
],
reject: [
{
code: `
$test: (Helvetica: 25px, Arial: 50px)
`,
message: messages.expected,
description:
"does not accept variables representing strings that are quoted.",
location: 1
}
]
});