optimize unit test

This commit is contained in:
wuls 2023-04-26 21:01:03 +08:00
parent 96ae817982
commit b871d91384
4 changed files with 17 additions and 4 deletions

View file

@ -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 {

View file

@ -0,0 +1,3 @@
---
---
<div>2</div>

View file

@ -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>

View file

@ -0,0 +1,3 @@
---
---
<div>3</div>