mirror of
https://github.com/withastro/astro.git
synced 2025-01-06 22:10:10 -05:00
[ci] format
This commit is contained in:
parent
19df89f87c
commit
369069a173
2 changed files with 12 additions and 13 deletions
|
@ -148,7 +148,7 @@ async function callComponentAsTemplateResultOrResponse(
|
|||
|
||||
if (factoryResult instanceof Response) {
|
||||
return factoryResult;
|
||||
}
|
||||
}
|
||||
// we check if the component we attempt to render is a head+content
|
||||
else if (isHeadAndContent(factoryResult)) {
|
||||
// we make sure that content is valid template result
|
||||
|
|
|
@ -4,13 +4,13 @@ import { experimental_AstroContainer } from '../dist/container/index.js';
|
|||
import {
|
||||
Fragment,
|
||||
createComponent,
|
||||
createHeadAndContent,
|
||||
maybeRenderHead,
|
||||
render,
|
||||
renderComponent,
|
||||
renderHead,
|
||||
renderSlot,
|
||||
createHeadAndContent,
|
||||
renderTemplate
|
||||
renderTemplate,
|
||||
} from '../dist/runtime/server/index.js';
|
||||
|
||||
const BaseLayout = createComponent((result, _props, slots) => {
|
||||
|
@ -145,7 +145,6 @@ describe('Container', () => {
|
|||
it('Renders content and head component', async () => {
|
||||
const Page = createComponent(
|
||||
(result, _props, slots) => {
|
||||
|
||||
return createHeadAndContent(
|
||||
'',
|
||||
renderTemplate`${renderComponent(
|
||||
|
@ -161,18 +160,18 @@ describe('Container', () => {
|
|||
`,
|
||||
head: () => render`
|
||||
${renderComponent(
|
||||
result,
|
||||
'Fragment',
|
||||
Fragment,
|
||||
{ slot: 'head' },
|
||||
{
|
||||
default: () => render`<meta charset="utf-8">`,
|
||||
}
|
||||
)}
|
||||
result,
|
||||
'Fragment',
|
||||
Fragment,
|
||||
{ slot: 'head' },
|
||||
{
|
||||
default: () => render`<meta charset="utf-8">`,
|
||||
}
|
||||
)}
|
||||
`,
|
||||
}
|
||||
)}`
|
||||
);
|
||||
);
|
||||
},
|
||||
'Component2.astro',
|
||||
undefined
|
||||
|
|
Loading…
Reference in a new issue