container.test.js — astro Source File
Architecture documentation for container.test.js, a javascript file in the astro codebase. 7 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR a0af2cb3_cf33_231e_1236_22c85f7b2603["container.test.js"] 62a75511_6f5e_99d0_6589_9f0adbe6aaa0["../dist/container/index.js"] a0af2cb3_cf33_231e_1236_22c85f7b2603 --> 62a75511_6f5e_99d0_6589_9f0adbe6aaa0 36446797_9ff6_e36e_ac08_4b016b6eefad["../../../dist/runtime/server/index.js"] a0af2cb3_cf33_231e_1236_22c85f7b2603 --> 36446797_9ff6_e36e_ac08_4b016b6eefad be670a78_841c_46e5_0af5_c5c328869ecb["test-adapter.js"] a0af2cb3_cf33_231e_1236_22c85f7b2603 --> be670a78_841c_46e5_0af5_c5c328869ecb 0a624eac_945e_c9e8_c9de_3feb9de2dd15["test-utils.js"] a0af2cb3_cf33_231e_1236_22c85f7b2603 --> 0a624eac_945e_c9e8_c9de_3feb9de2dd15 dd4f09ce_3fd7_8295_f616_8876cda4555c["loadFixture"] a0af2cb3_cf33_231e_1236_22c85f7b2603 --> dd4f09ce_3fd7_8295_f616_8876cda4555c e1e2fac7_5a95_7a88_cb1e_0a3b91c4e607["strict"] a0af2cb3_cf33_231e_1236_22c85f7b2603 --> e1e2fac7_5a95_7a88_cb1e_0a3b91c4e607 6b0635f9_51ea_77aa_767b_7857878e98a6["node:test"] a0af2cb3_cf33_231e_1236_22c85f7b2603 --> 6b0635f9_51ea_77aa_767b_7857878e98a6 style a0af2cb3_cf33_231e_1236_22c85f7b2603 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import assert from 'node:assert/strict';
import { before, describe, it } from 'node:test';
import { experimental_AstroContainer } from '../dist/container/index.js';
import {
createAstro,
createComponent,
createHeadAndContent,
Fragment,
maybeRenderHead,
render,
renderComponent,
renderHead,
renderSlot,
renderTemplate,
} from '../dist/runtime/server/index.js';
import testAdapter from './test-adapter.js';
import { loadFixture } from './test-utils.js';
const BaseLayout = createComponent((result, _props, slots) => {
return render`<html>
<head>
${renderSlot(result, slots['head'])}
${renderHead(result)}
</head>
${maybeRenderHead(result)}
<body>
${renderSlot(result, slots['default'])}
</body>
</html>`;
});
describe('Container', () => {
it('Renders a div with hello world text', async () => {
const Page = createComponent((result) => {
return render`${renderComponent(
result,
'BaseLayout',
BaseLayout,
{},
{
default: () => render`${maybeRenderHead(result)}<div>hello world</div>`,
head: () => render`
${renderComponent(
result,
'Fragment',
Fragment,
{ slot: 'head' },
{
default: () => render`<meta charset="utf-8">`,
},
)}
`,
},
)}`;
});
const container = await experimental_AstroContainer.create();
const response = await container.renderToString(Page);
assert.match(response, /hello world/);
// ... (264 more lines)
Domain
Subdomains
Functions
Dependencies
- ../../../dist/runtime/server/index.js
- ../dist/container/index.js
- loadFixture
- node:test
- strict
- test-adapter.js
- test-utils.js
Source
Frequently Asked Questions
What does container.test.js do?
container.test.js is a source file in the astro codebase, written in javascript. It belongs to the IntegrationAdapters domain, SsrAdapters subdomain.
What functions are defined in container.test.js?
container.test.js defines 1 function(s): BaseLayout.
What does container.test.js depend on?
container.test.js imports 7 module(s): ../../../dist/runtime/server/index.js, ../dist/container/index.js, loadFixture, node:test, strict, test-adapter.js, test-utils.js.
Where is container.test.js in the architecture?
container.test.js is located at packages/astro/test/container.test.js (domain: IntegrationAdapters, subdomain: SsrAdapters, directory: packages/astro/test).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free