From e44e340f7ef25dd6a0007089e4fb9a673d33d375 Mon Sep 17 00:00:00 2001 From: matthewp Date: Thu, 9 Feb 2023 16:52:23 +0000 Subject: [PATCH] [ci] format --- packages/astro/src/runtime/server/render/common.ts | 4 ++-- packages/astro/src/runtime/server/render/slot.ts | 2 +- packages/astro/test/head-injection.test.js | 2 +- packages/integrations/mdx/test/css-head-mdx.test.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/astro/src/runtime/server/render/common.ts b/packages/astro/src/runtime/server/render/common.ts index 484f574c6f..6bcd72cc54 100644 --- a/packages/astro/src/runtime/server/render/common.ts +++ b/packages/astro/src/runtime/server/render/common.ts @@ -65,7 +65,7 @@ export function stringifyChunk(result: SSRResult, chunk: string | SlotString | R // Astro rendered within JSX, head will be injected by the page itself. case ScopeFlags.JSX | ScopeFlags.Astro: { - if(hasScopeFlag(result, ScopeFlags.JSX)) { + if (hasScopeFlag(result, ScopeFlags.JSX)) { return ''; } break; @@ -73,7 +73,7 @@ export function stringifyChunk(result: SSRResult, chunk: string | SlotString | R // If the current scope is with Astro.slots.render() case ScopeFlags.Slot: { - if(hasScopeFlag(result, ScopeFlags.RenderSlot)) { + if (hasScopeFlag(result, ScopeFlags.RenderSlot)) { return ''; } break; diff --git a/packages/astro/src/runtime/server/render/slot.ts b/packages/astro/src/runtime/server/render/slot.ts index b0e8a0fa72..5e21d1e07c 100644 --- a/packages/astro/src/runtime/server/render/slot.ts +++ b/packages/astro/src/runtime/server/render/slot.ts @@ -4,7 +4,7 @@ import type { RenderInstruction } from './types.js'; import { HTMLString, markHTMLString } from '../escape.js'; import { renderChild } from './any.js'; -import { createScopedResult, hasScopeFlag, ScopeFlags } from './scope.js'; +import { createScopedResult, ScopeFlags } from './scope.js'; type RenderTemplateResult = ReturnType; export type ComponentSlots = Record; diff --git a/packages/astro/test/head-injection.test.js b/packages/astro/test/head-injection.test.js index 6f60107733..d06a6eed0f 100644 --- a/packages/astro/test/head-injection.test.js +++ b/packages/astro/test/head-injection.test.js @@ -21,7 +21,7 @@ describe('Head injection', () => { it('only injects head content once', async () => { const html = await fixture.readFile(`/index.html`); const $ = cheerio.load(html); - + expect($('head link[rel=stylesheet]')).to.have.a.lengthOf(1); }); }); diff --git a/packages/integrations/mdx/test/css-head-mdx.test.js b/packages/integrations/mdx/test/css-head-mdx.test.js index 82a86e5d23..bb2c7c0eff 100644 --- a/packages/integrations/mdx/test/css-head-mdx.test.js +++ b/packages/integrations/mdx/test/css-head-mdx.test.js @@ -65,7 +65,7 @@ describe('Head injection w/ MDX', () => { const headLinks = $('head link[rel=stylesheet]'); expect(headLinks).to.have.a.lengthOf(1); - + const bodyLinks = $('body link[rel=stylesheet]'); expect(bodyLinks).to.have.a.lengthOf(0); });