Home / File/ Card.test.ts — astro Source File

Card.test.ts — astro Source File

Architecture documentation for Card.test.ts, a typescript file in the astro codebase. 4 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  fa4dcb7b_d520_e105_c92e_95f38d251971["Card.test.ts"]
  06727e15_b0ef_6673_ffcf_5d6f89efb4d8["../src/components/Card.astro"]
  fa4dcb7b_d520_e105_c92e_95f38d251971 --> 06727e15_b0ef_6673_ffcf_5d6f89efb4d8
  ab696056_9f9c_3f1b_8714_fea1be35eb3c["../src/components/CounterLight.astro"]
  fa4dcb7b_d520_e105_c92e_95f38d251971 --> ab696056_9f9c_3f1b_8714_fea1be35eb3c
  e5359079_11b2_76cc_fb55_2963613c4b02["container"]
  fa4dcb7b_d520_e105_c92e_95f38d251971 --> e5359079_11b2_76cc_fb55_2963613c4b02
  3e3298c2_86dd_c820_c444_b15ecaad6b48["vitest"]
  fa4dcb7b_d520_e105_c92e_95f38d251971 --> 3e3298c2_86dd_c820_c444_b15ecaad6b48
  style fa4dcb7b_d520_e105_c92e_95f38d251971 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { experimental_AstroContainer as AstroContainer } from 'astro/container';
import { expect, test } from 'vitest';
import Card from '../src/components/Card.astro';
import CounterLight from '../src/components/CounterLight.astro';

test('Card with slots', async () => {
	const container = await AstroContainer.create();
	const result = await container.renderToString(Card, {
		slots: {
			default: 'Card content',
		},
	});

	expect(result).toContain('This is a card');
	expect(result).toContain('Card content');
});

test('Card with nested CounterLight', async () => {
	const container = await AstroContainer.create();
	const counterLight = await container.renderToString(CounterLight, { props: { count: 1 } });
	const result = await container.renderToString(Card, {
		slots: {
			default: counterLight,
		},
	});

	expect(result).toContain('This is a card');
	expect(result).toContain(counterLight);
});

Dependencies

  • ../src/components/Card.astro
  • ../src/components/CounterLight.astro
  • container
  • vitest

Frequently Asked Questions

What does Card.test.ts do?
Card.test.ts is a source file in the astro codebase, written in typescript. It belongs to the IntegrationAdapters domain.
What does Card.test.ts depend on?
Card.test.ts imports 4 module(s): ../src/components/Card.astro, ../src/components/CounterLight.astro, container, vitest.
Where is Card.test.ts in the architecture?
Card.test.ts is located at examples/container-with-vitest/test/Card.test.ts (domain: IntegrationAdapters, directory: examples/container-with-vitest/test).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free