UNPKG

897 BSCSSView Raw
1@import "restyle";
2
3$config: (
4 a: true,
5 b: false,
6 c: (
7 z: true
8 ),
9 d: (
10 x: (
11 y: (
12 z: true
13 )
14 )
15 )
16);
17
18$tests: (
19 (
20 test: 'a',
21 expected: true
22 ),
23 (
24 test: 'a:z',
25 expected: true
26 ),
27 (
28 test: 'b',
29 expected: false
30 ),
31 (
32 test: 'b:z',
33 expected: false
34 ),
35 (
36 test: 'c',
37 expected: false
38 ),
39 (
40 test: 'c:z',
41 expected: true
42 ),
43 (
44 test: 'c:z:y:z',
45 expected: true
46 ),
47 (
48 test: 'd',
49 expected: false
50 ),
51 (
52 test: 'd:x:y:z',
53 expected: true
54 )
55);
56
57/* config: #{inspect($config)} */
58@each $test in $tests {
59 $log: map-get($test, test);
60 $expected: map-get($test, expected);
61
62 $actual: -restyle--is-logging-enabled-js($log, $config);
63
64 $result: if($actual == $expected, 'PASS', 'FAIL');
65
66 /* #{$result}: -restyle--is-logging-enabled-js('#{$log}') should be `#{$expected}` */
67}