1
0
Fork 1
mirror of https://github.com/thatmattlove/hyperglass.git synced 2026-01-23 18:58:07 +00:00
thatmattlove-hyperglass/hyperglass/ui/util/theme.test.ts
2021-09-21 10:12:07 -07:00

14 lines
505 B
TypeScript

import { googleFontUrl } from './theme';
describe('google font URL generation', () => {
test('no space font', () => {
const result = googleFontUrl('Inter', [100, 200, 300]);
expect(result).toBe('https://fonts.googleapis.com/css?family=Inter:100,200,300&display=swap');
});
test('space font', () => {
const result = googleFontUrl('Open Sans', [100, 200, 300]);
expect(result).toBe(
'https://fonts.googleapis.com/css?family=Open+Sans:100,200,300&display=swap',
);
});
});