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._metadata.headInTree =
result.componentMetadata.get((componentFactory as any).moduleId)?.containsHead ?? false; result.componentMetadata.get((componentFactory as any).moduleId)?.containsHead ?? false;
const pageProps: Record<string, any> = { ...(props ?? {}), 'server:root': true }; const pageProps: Record<string, any> = { ...(props ?? {}), 'server:root': true };
let output: ComponentIterable; let output: ComponentIterable;
let head = ''; let head = '';
try { 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"> <html lang="en">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width" /> <meta name="viewport" content="width=device-width" />
<title>minimum html</title> <title>minimum html</title>
<style>
.body{
background: red;
}
</style>
</head> </head>
<body> <body>
<main> <Aside/>
</main> <main></main>
<Page></Page>
</body> </body>
</html> </html>

View file

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