/
leadingStar.js
48 lines (43 loc) · 946 Bytes
/
leadingStar.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
import test from 'ava';
import processCSS from './_processCSS';
const opts = {target: 'ie7', unaffected: 'ie8'};
function testStarHack (t, character) {
return processCSS(
t,
`h1 { ${character}color: red }`,
`h1 { }`,
opts
);
}
test(testStarHack, '*');
test(testStarHack, '!');
test(testStarHack, '$');
test(testStarHack, '&');
test(testStarHack, ')');
test(testStarHack, '=');
test(testStarHack, '%');
test(testStarHack, '+');
test(testStarHack, ',');
test(testStarHack, '.');
test(testStarHack, '/');
test(testStarHack, '`');
test(testStarHack, ']');
test(testStarHack, '#');
test(testStarHack, '~');
test(testStarHack, '?');
test(testStarHack, ':');
test(testStarHack, '|');
test(
'should also handle @hacks',
processCSS,
'h1 { @color: red }',
'h1 {}',
opts
);
test(
'should also handle @hacks (uppercase)',
processCSS,
'h1 { @COLOR: red }',
'h1 {}',
opts
);