1 | @import "restyle";
|
2 |
|
3 | .is-selector {
|
4 | $tests: (
|
5 | ".test": true,
|
6 | "#test": true,
|
7 | "%test": false,
|
8 | "test": false,
|
9 | "& test": true,
|
10 | "> test": true,
|
11 | "test a": true,
|
12 | "test{foo}": false
|
13 | );
|
14 |
|
15 | @each $test, $expected in $tests {
|
16 | $actual: -restyle--is-selector($test);
|
17 |
|
18 | $actual: -restyle--is-selector-js($test);
|
19 |
|
20 | }
|
21 |
|
22 | }
|
23 |
|
24 | .get-directive {
|
25 | $tests: (
|
26 | "@restyle.foo": foo,
|
27 | "foo": false,
|
28 | "restyle-foo": foo
|
29 | );
|
30 |
|
31 | @each $test, $expected in $tests {
|
32 | $actual: -restyle--get-directive($test);
|
33 |
|
34 | $actual: -restyle--get-directive-js($test);
|
35 |
|
36 | }
|
37 | }
|
38 |
|
39 | .normalize-property {
|
40 | $tests: (
|
41 | test\foo: test,
|
42 | "test{foo}": test,
|
43 | test-foo: test-foo,
|
44 | "test": test
|
45 | );
|
46 |
|
47 | @each $test, $expected in $tests {
|
48 | $actual: -restyle--normalize-property($test);
|
49 |
|
50 | $actual: -restyle--normalize-property-js($test);
|
51 |
|
52 | }
|
53 | }
|
54 |
|
55 | .normalize-word {
|
56 | $tests: (
|
57 | yellow: unquote('yellow')
|
58 | );
|
59 |
|
60 | @each $test, $expected in $tests {
|
61 | $actual: -restyle--normalize-word-js($test);
|
62 |
|
63 | }
|
64 | }
|