diff --git a/test/index.spec.ts b/test/index.spec.ts index 36d1a09..3399942 100644 --- a/test/index.spec.ts +++ b/test/index.spec.ts @@ -148,7 +148,7 @@ describe('parseFontFace', () => { url("/fonts/OpenSans-Regular-webfont.woff") format("woff"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB; }` - ) + ).next().value expect(result).toMatchInlineSnapshot(` { "family": "Roboto", @@ -157,28 +157,30 @@ describe('parseFontFace', () => { `) }) it('should handle incomplete font-faces', () => { - const result = parseFontFace( + for (const result of parseFontFace( `@font-face { }` - ) - expect(result).toMatchInlineSnapshot(` + )) { + expect(result).toMatchInlineSnapshot(` { "family": "", "source": "", } `) + } }) it('should handle sources without urls', () => { - const result = parseFontFace( + for (const result of parseFontFace( `@font-face { src: local("Arial") url(); }` - ) - expect(result).toMatchInlineSnapshot(` + )) { + expect(result).toMatchInlineSnapshot(` { "family": "", "source": "", } - `) + `) + } }) })