Home / File/ with-svelte.test.js — astro Source File

with-svelte.test.js — astro Source File

Architecture documentation for with-svelte.test.js, a javascript file in the astro codebase. 5 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  330da586_6fa9_bf3e_6968_303a5c697c5a["with-svelte.test.js"]
  635e1221_67bb_e784_624a_d6d63643872b["_test-utils.js"]
  330da586_6fa9_bf3e_6968_303a5c697c5a --> 635e1221_67bb_e784_624a_d6d63643872b
  33b9a01d_12ac_568f_9775_9e80b35139cb["loadFixture"]
  330da586_6fa9_bf3e_6968_303a5c697c5a --> 33b9a01d_12ac_568f_9775_9e80b35139cb
  e1e2fac7_5a95_7a88_cb1e_0a3b91c4e607["strict"]
  330da586_6fa9_bf3e_6968_303a5c697c5a --> e1e2fac7_5a95_7a88_cb1e_0a3b91c4e607
  6b0635f9_51ea_77aa_767b_7857878e98a6["node:test"]
  330da586_6fa9_bf3e_6968_303a5c697c5a --> 6b0635f9_51ea_77aa_767b_7857878e98a6
  deb87372_5629_35f8_9a54_e755a08f776a["cheerio"]
  330da586_6fa9_bf3e_6968_303a5c697c5a --> deb87372_5629_35f8_9a54_e755a08f776a
  style 330da586_6fa9_bf3e_6968_303a5c697c5a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import * as assert from 'node:assert/strict';
import { after, before, describe, it } from 'node:test';
import * as cheerio from 'cheerio';
import { loadFixture } from './_test-utils.js';

describe('Svelte', () => {
	let fixture;
	let previewServer;

	before(async () => {
		fixture = await loadFixture({
			root: './fixtures/with-svelte/',
		});
		await fixture.build();
		previewServer = await fixture.preview();
	});

	after(async () => {
		await previewServer.stop();
		await fixture.clean();
	});

	it('renders the svelte component', async () => {
		const res = await fixture.fetch('/');
		assert.equal(res.status, 200);
		const html = await res.text();
		const $ = cheerio.load(html);
		assert.equal($('.svelte').text(), 'Svelte Content');
	});
});

Domain

Dependencies

Frequently Asked Questions

What does with-svelte.test.js do?
with-svelte.test.js is a source file in the astro codebase, written in javascript. It belongs to the CoreAstro domain.
What does with-svelte.test.js depend on?
with-svelte.test.js imports 5 module(s): _test-utils.js, cheerio, loadFixture, node:test, strict.
Where is with-svelte.test.js in the architecture?
with-svelte.test.js is located at packages/integrations/cloudflare/test/with-svelte.test.js (domain: CoreAstro, directory: packages/integrations/cloudflare/test).

Analyze Your Own Codebase

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

Try Supermodel Free