Home / File/ server-islands-key.test.js — astro Source File

server-islands-key.test.js — astro Source File

Architecture documentation for server-islands-key.test.js, a javascript file in the astro codebase. 3 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  2c572ef2_e58d_ebc9_44f4_112c76fc4875["server-islands-key.test.js"]
  2ca394f6_a63d_3921_1f12_c5a979ea0039["test-utils.js"]
  2c572ef2_e58d_ebc9_44f4_112c76fc4875 --> 2ca394f6_a63d_3921_1f12_c5a979ea0039
  e27f6887_ea47_dd44_7933_5faa0f6bcf4d["testFactory"]
  2c572ef2_e58d_ebc9_44f4_112c76fc4875 --> e27f6887_ea47_dd44_7933_5faa0f6bcf4d
  f8fbe851_c5d6_c4ee_c044_67a751668c18["test"]
  2c572ef2_e58d_ebc9_44f4_112c76fc4875 --> f8fbe851_c5d6_c4ee_c044_67a751668c18
  style 2c572ef2_e58d_ebc9_44f4_112c76fc4875 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { expect } from '@playwright/test';
import { testFactory } from './test-utils.js';

const test = testFactory(import.meta.url, { root: './fixtures/server-islands-key/' });

test.describe('Server islands - Key reuse', () => {
	test.describe('Production', () => {
		let previewServer;

		test.beforeAll(async ({ astro }) => {
			// Playwright's Node version doesn't have these functions, so stub them.
			process.stdout.clearLine = () => {};
			process.stdout.cursorTo = () => {};
			process.env.ASTRO_KEY = 'eKBaVEuI7YjfanEXHuJe/pwZKKt3LkAHeMxvTU7aR0M=';
			await astro.build();
			previewServer = await astro.preview();
		});

		test.afterAll(async () => {
			await previewServer.stop();
			delete process.env.ASTRO_KEY;
		});

		test('Components render properly', async ({ page, astro }) => {
			await page.goto(astro.resolveUrl('/'));

			let el = page.locator('#island');

			await expect(el, 'element rendered').toBeVisible();
			await expect(el, 'should have content').toHaveText('I am an island');
		});
	});
});

Domain

Dependencies

Frequently Asked Questions

What does server-islands-key.test.js do?
server-islands-key.test.js is a source file in the astro codebase, written in javascript. It belongs to the E2ETesting domain.
What does server-islands-key.test.js depend on?
server-islands-key.test.js imports 3 module(s): test, test-utils.js, testFactory.
Where is server-islands-key.test.js in the architecture?
server-islands-key.test.js is located at packages/astro/e2e/server-islands-key.test.js (domain: E2ETesting, directory: packages/astro/e2e).

Analyze Your Own Codebase

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

Try Supermodel Free