Home / File/ nested-styles.test.js — astro Source File

nested-styles.test.js — astro Source File

Architecture documentation for nested-styles.test.js, a javascript file in the astro codebase. 3 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  e996a3cc_ad54_88c2_a3ea_afb9780f702f["nested-styles.test.js"]
  2ca394f6_a63d_3921_1f12_c5a979ea0039["test-utils.js"]
  e996a3cc_ad54_88c2_a3ea_afb9780f702f --> 2ca394f6_a63d_3921_1f12_c5a979ea0039
  e27f6887_ea47_dd44_7933_5faa0f6bcf4d["testFactory"]
  e996a3cc_ad54_88c2_a3ea_afb9780f702f --> e27f6887_ea47_dd44_7933_5faa0f6bcf4d
  f8fbe851_c5d6_c4ee_c044_67a751668c18["test"]
  e996a3cc_ad54_88c2_a3ea_afb9780f702f --> f8fbe851_c5d6_c4ee_c044_67a751668c18
  style e996a3cc_ad54_88c2_a3ea_afb9780f702f 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/nested-styles/',
	devToolbar: {
		enabled: false,
	},
	vite: {
		optimizeDeps: {
			// Vite has a bug where if you close the server too quickly, while the optimized
			// dependencies are still held before serving, it will stall the server from closing.
			// This will workaround it for now.
			holdUntilCrawlEnd: false,
		},
	},
});

let devServer;

test.beforeAll(async ({ astro }) => {
	devServer = await astro.startDevServer();
});

test.afterAll(async () => {
	await devServer.stop();
});

test.describe('Loading styles that are nested', () => {
	test('header', async ({ page, astro }) => {
		await page.goto(astro.resolveUrl('/'));

		const header = page.locator('header');

		await expect(header, 'should have background color').toHaveCSS(
			'background-color',
			'rgb(0, 0, 139)', // darkblue
		);
	});
});

Domain

Dependencies

Frequently Asked Questions

What does nested-styles.test.js do?
nested-styles.test.js is a source file in the astro codebase, written in javascript. It belongs to the E2ETesting domain.
What does nested-styles.test.js depend on?
nested-styles.test.js imports 3 module(s): test, test-utils.js, testFactory.
Where is nested-styles.test.js in the architecture?
nested-styles.test.js is located at packages/astro/e2e/nested-styles.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