You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
assert.equal(result.includes('@import url(https://fonts.bunny.net/css?family=noto-sans:400,700);'),true,'Includes the correct import for the body font');
67
+
assert.equal(result.includes('<link rel="preconnect" href="https://fonts.bunny.net"><link rel="stylesheet" href="https://fonts.bunny.net/css?family=noto-sans:400,700">'),true,'Includes the correct import for the body font');
68
68
assert.equal(result.includes(':root {--gh-font-body: Noto Sans;}'),true,'Includes the correct CSS for the body font');
69
69
assert.equal(result.includes('--gh-font-heading'),false,'Does not include CSS for the title font');
70
70
});
71
71
72
72
it('returns correct CSS for different heading and body fonts',function(){
assert.equal(result.includes('@import url(https://fonts.bunny.net/css?family=chakra-petch:400);'),true,'Includes the correct import for the heading font');
76
-
assert.equal(result.includes('@import url(https://fonts.bunny.net/css?family=poppins:400,500,600);'),true,'Includes the correct import for the body font');
75
+
assert.equal(result.includes('<link rel="preconnect" href="https://fonts.bunny.net"><link rel="stylesheet" href="https://fonts.bunny.net/css?family=chakra-petch:400|poppins:400,500,600">'),true,'Includes the correct import for the heading font');
77
76
assert.equal(result.includes(':root {--gh-font-heading: Chakra Petch;--gh-font-body: Poppins;}'),true,'Includes the correct CSS for the body and heading fonts');
78
77
});
79
78
80
79
it('returns correct CSS with only one import for equal heading and body fonts',function(){
assert.equal(result,'<style>@import url(https://fonts.bunny.net/css?family=lora:400,700);:root {--gh-font-heading: Lora;--gh-font-body: Lora;}</style>','Includes the correct CSS with only one import for equal heading and body fonts');
82
+
assert.equal(result.includes('<link rel="preconnect" href="https://fonts.bunny.net"><link rel="stylesheet" href="https://fonts.bunny.net/css?family=lora:400,700">'),true,'Includes the correct CSS with only one import for equal heading and body fonts');
83
+
assert.equal(result.includes(':root {--gh-font-heading: Lora;--gh-font-body: Lora;}'),true,'Includes the correct CSS for the body and heading fonts');
84
84
});
85
85
86
86
it('generates CSS when only body font is provided',function(){
0 commit comments