0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-20 22:12:38 -05:00

[ci] format

This commit is contained in:
Emanuele Stoppa 2024-05-29 11:30:17 +00:00 committed by astrobot-houston
parent 19df89f87c
commit 369069a173
2 changed files with 12 additions and 13 deletions

View file

@ -148,7 +148,7 @@ async function callComponentAsTemplateResultOrResponse(
if (factoryResult instanceof Response) { if (factoryResult instanceof Response) {
return factoryResult; return factoryResult;
} }
// we check if the component we attempt to render is a head+content // we check if the component we attempt to render is a head+content
else if (isHeadAndContent(factoryResult)) { else if (isHeadAndContent(factoryResult)) {
// we make sure that content is valid template result // we make sure that content is valid template result

View file

@ -4,13 +4,13 @@ import { experimental_AstroContainer } from '../dist/container/index.js';
import { import {
Fragment, Fragment,
createComponent, createComponent,
createHeadAndContent,
maybeRenderHead, maybeRenderHead,
render, render,
renderComponent, renderComponent,
renderHead, renderHead,
renderSlot, renderSlot,
createHeadAndContent, renderTemplate,
renderTemplate
} from '../dist/runtime/server/index.js'; } from '../dist/runtime/server/index.js';
const BaseLayout = createComponent((result, _props, slots) => { const BaseLayout = createComponent((result, _props, slots) => {
@ -145,7 +145,6 @@ describe('Container', () => {
it('Renders content and head component', async () => { it('Renders content and head component', async () => {
const Page = createComponent( const Page = createComponent(
(result, _props, slots) => { (result, _props, slots) => {
return createHeadAndContent( return createHeadAndContent(
'', '',
renderTemplate`${renderComponent( renderTemplate`${renderComponent(
@ -161,18 +160,18 @@ describe('Container', () => {
`, `,
head: () => render` head: () => render`
${renderComponent( ${renderComponent(
result, result,
'Fragment', 'Fragment',
Fragment, Fragment,
{ slot: 'head' }, { slot: 'head' },
{ {
default: () => render`<meta charset="utf-8">`, default: () => render`<meta charset="utf-8">`,
} }
)} )}
`, `,
} }
)}` )}`
); );
}, },
'Component2.astro', 'Component2.astro',
undefined undefined