optimize unit test
This commit is contained in:
parent
96ae817982
commit
b871d91384
4 changed files with 17 additions and 4 deletions
|
@ -79,7 +79,7 @@ export async function renderPage(
|
|||
result._metadata.headInTree =
|
||||
result.componentMetadata.get((componentFactory as any).moduleId)?.containsHead ?? false;
|
||||
const pageProps: Record<string, any> = { ...(props ?? {}), 'server:root': true };
|
||||
|
||||
|
||||
let output: ComponentIterable;
|
||||
let head = '';
|
||||
try {
|
||||
|
|
3
packages/astro/test/fixtures/minification-html/src/pages/aside.astro
vendored
Normal file
3
packages/astro/test/fixtures/minification-html/src/pages/aside.astro
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
---
|
||||
<div>2</div>
|
|
@ -1,14 +1,21 @@
|
|||
---
|
||||
|
||||
import Aside from './aside.astro'
|
||||
import Page from './page.astro'
|
||||
---
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title>minimum html</title>
|
||||
<style>
|
||||
.body{
|
||||
background: red;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
</main>
|
||||
<Aside/>
|
||||
<main></main>
|
||||
<Page></Page>
|
||||
</body>
|
||||
</html>
|
||||
|
|
3
packages/astro/test/fixtures/minification-html/src/pages/page.astro
vendored
Normal file
3
packages/astro/test/fixtures/minification-html/src/pages/page.astro
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
---
|
||||
<div>3</div>
|
Loading…
Reference in a new issue