-
-
Notifications
You must be signed in to change notification settings - Fork 320
/
issue420.js
17 lines (16 loc) · 1.27 KB
/
issue420.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import test from 'ava';
import postcss from 'postcss';
import fontMagician from 'postcss-font-magician';
import cssnano from '..';
test('should work with postcss-font-magician with `display` parameter', t => {
const css = `
body {
font-family: "Alice";
}
`;
return postcss([fontMagician({display: "optional"}), cssnano]).process(css).then(result => {
t.deepEqual(result.css, `@font-face{font-family:Alice;font-style:normal;font-weight:400;src:local("Alice Regular"),local(Alice-Regular),url(//fonts.gstatic.com/s/alice/v9/OpNCnoEEmtHa6GcOrgo.eot#) format("eot"),url(//fonts.gstatic.com/s/alice/v9/OpNCnoEEmtHa6GcOrg4.woff2) format("woff2"),url(//fonts.gstatic.com/s/alice/v9/OpNCnoEEmtHa6GcOrgg.woff) format("woff");font-display:optional}body{font-family:Alice}`);
// Switch back once css-declaration-sorter has been fixed
// t.deepEqual(result.css, `@font-face{font-display:optional;font-family:Alice;font-style:normal;font-weight:400;src:local("Alice Regular"),local(Alice-Regular),url(//fonts.gstatic.com/s/alice/v9/OpNCnoEEmtHa6GcOrgo.eot#) format("eot"),url(//fonts.gstatic.com/s/alice/v9/OpNCnoEEmtHa6GcOrg4.woff2) format("woff2"),url(//fonts.gstatic.com/s/alice/v9/OpNCnoEEmtHa6GcOrgg.woff) format("woff")}body{font-family:Alice}`);
});
});