MCPcopy Create free account
hub / github.com/CoderLine/alphaTab / parseText

Function parseText

packages/alphatab/test/model/Font.test.ts:4–12  ·  view source on GitHub ↗
(text: string, expected: Font)

Source from the content-addressed store, hash-verified

2import { Font, FontStyle, FontWeight } from '@coderline/alphatab/model/Font';
3describe('FontTests', () => {
4 function parseText(text: string, expected: Font) {
5 const font = Font.fromJson(text);
6 expect(font!.families.join(', ')).toBe(expected.families.join(', '));
7 expect(font!.isBold).toBe(expected.isBold);
8 expect(font!.isItalic).toBe(expected.isItalic);
9 expect(font!.size).toBe(expected.size);
10 expect(font!.style).toBe(expected.style);
11 expect(font!.weight).toBe(expected.weight);
12 }
13
14 it('parses-full', () => {
15 parseText(

Callers 1

Font.test.tsFile · 0.85

Calls 3

fromJsonMethod · 0.45
toBeMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected