From e516f9c953ad1517d6115a9ecb1c355b4bffb8b9 Mon Sep 17 00:00:00 2001 From: FredKSchott Date: Fri, 3 Sep 2021 18:07:39 +0000 Subject: [PATCH] [ci] yarn format --- .../src/pages/reference/builtin-components.md | 2 -- .../astro/test/astro-component-code.test.js | 23 +++++++++++-------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/docs/src/pages/reference/builtin-components.md b/docs/src/pages/reference/builtin-components.md index 7ff0e5ba6..d171c9a82 100644 --- a/docs/src/pages/reference/builtin-components.md +++ b/docs/src/pages/reference/builtin-components.md @@ -5,7 +5,6 @@ title: Built-In Components Astro includes several builtin components for you to use in your projects. All builtin components are available via `import {} from 'astro/components';`. - ## `` ```astro @@ -24,7 +23,6 @@ This component provides syntax highlighting for code blocks at build time (no cl You can also use the `` component for syntax highlighting powered by the [Prism](https://prismjs.com/) syntax highlighting library. This is the library that Astro's Markdown uses by default. However, we will be transitioning all usage over to `` as we move towards our v1.0 release. - ## `` ```astro diff --git a/packages/astro/test/astro-component-code.test.js b/packages/astro/test/astro-component-code.test.js index de291f0b5..bc5380ca1 100644 --- a/packages/astro/test/astro-component-code.test.js +++ b/packages/astro/test/astro-component-code.test.js @@ -36,7 +36,7 @@ Components('', async ({ runtime }) => { assert.equal($('pre').attr('style'), 'background-color: #2e3440ff; overflow-x: auto;', 'applies custom theme'); }); -Components('', async ({ runtime }) => { +Components('', async ({ runtime }) => { { let result = await runtime.load('/wrap-true'); assert.ok(!result.error, `build error: ${result.error}`); @@ -66,14 +66,19 @@ Components('', async ({ runtime }) => { const $ = doc(result.contents); assert.equal($('pre').length, 1); assert.equal($('pre').attr('class'), 'astro-code'); - assert.equal($('pre, pre span').map((i, f) => f.attribs ? f.attribs.style : 'no style found').toArray(), [ - "background-color: var(--astro-code-color-background); overflow-x: auto;", - "color: var(--astro-code-token-constant)", - "color: var(--astro-code-token-function)", - "color: var(--astro-code-color-text)", - "color: var(--astro-code-token-string-expression)", - "color: var(--astro-code-color-text)", - ]); + assert.equal( + $('pre, pre span') + .map((i, f) => (f.attribs ? f.attribs.style : 'no style found')) + .toArray(), + [ + 'background-color: var(--astro-code-color-background); overflow-x: auto;', + 'color: var(--astro-code-token-constant)', + 'color: var(--astro-code-token-function)', + 'color: var(--astro-code-color-text)', + 'color: var(--astro-code-token-string-expression)', + 'color: var(--astro-code-color-text)', + ] + ); }); Components.run();