Skip to content

Commit

Permalink
test: less logging in glyphs.test.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelKreil committed Apr 10, 2024
1 parent 516f471 commit 15f7a6a
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions src/lib/glyphs.test.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,28 @@
import { buildAllGlyphs } from './glyphs.ts';
import { getFontSources } from './fonts.ts';
/* eslint-disable @typescript-eslint/explicit-function-return-type */
/* eslint-disable @typescript-eslint/naming-convention */
import { jest } from '@jest/globals';

describe('buildAllGlyphs', () => {
jest.unstable_mockModule('./progress.ts', () => ({
Progress: function () {
return {
increase: () => {
return;
},
finish: () => {
return;
},
};
},
}));
const { buildAllGlyphs } = await import('./glyphs.ts');
const { getFontSources } = await import('./fonts.ts');

describe('buildAllGlyphs', () => {
it('should build all glyphs from font sources', async () => {
process.chdir(new URL('../../', import.meta.url).pathname);
const fontSources = getFontSources('font-sources')
.filter(f => f.fontFace.fontId === 'fira_sans_bold');

const result = await buildAllGlyphs(fontSources);

expect(Array.isArray(result)).toBe(true);
Expand Down

0 comments on commit 15f7a6a

Please sign in to comment.