Home / File/ pass-js.test.js — astro Source File

pass-js.test.js — astro Source File

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

Entity Profile

Dependency Diagram

graph LR
  cfbe18d1_4496_a28b_5b7d_7e82b009fa7b["pass-js.test.js"]
  2ca394f6_a63d_3921_1f12_c5a979ea0039["test-utils.js"]
  cfbe18d1_4496_a28b_5b7d_7e82b009fa7b --> 2ca394f6_a63d_3921_1f12_c5a979ea0039
  e27f6887_ea47_dd44_7933_5faa0f6bcf4d["testFactory"]
  cfbe18d1_4496_a28b_5b7d_7e82b009fa7b --> e27f6887_ea47_dd44_7933_5faa0f6bcf4d
  f8fbe851_c5d6_c4ee_c044_67a751668c18["test"]
  cfbe18d1_4496_a28b_5b7d_7e82b009fa7b --> f8fbe851_c5d6_c4ee_c044_67a751668c18
  style cfbe18d1_4496_a28b_5b7d_7e82b009fa7b 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/pass-js/',
});

let devServer;

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

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

test.describe('Passing JS into client components', () => {
	test('Primitive values', async ({ astro, page }) => {
		await page.goto(astro.resolveUrl('/'));

		// undefined
		const undefinedType = page.locator('#undefined-type');
		await expect(undefinedType, 'is visible').toBeVisible();
		await expect(undefinedType).toHaveText('[object Undefined]');

		// null
		const nullType = page.locator('#null-type');
		await expect(nullType, 'is visible').toBeVisible();
		await expect(nullType).toHaveText('[object Null]');

		// boolean
		const booleanType = page.locator('#boolean-type');
		await expect(booleanType, 'is visible').toBeVisible();
		await expect(booleanType).toHaveText('[object Boolean]');

		const booleanValue = page.locator('#boolean-value');
		await expect(booleanValue, 'is visible').toBeVisible();
		await expect(booleanValue).toHaveText('true');

		// number
		const numberType = page.locator('#number-type');
		await expect(numberType, 'is visible').toBeVisible();
		await expect(numberType).toHaveText('[object Number]');

		const numberValue = page.locator('#number-value');
		await expect(numberValue, 'is visible').toBeVisible();
		await expect(numberValue).toHaveText('16');

		const infinityType = page.locator('#infinity-type');
		await expect(infinityType, 'is visible').toBeVisible();
		await expect(infinityType).toHaveText('[object Number]');

		const negativeInfinityType = page.locator('#negative-infinity-type');
		await expect(negativeInfinityType, 'is visible').toBeVisible();
		await expect(negativeInfinityType).toHaveText('[object Number]');

		const infinityValue = page.locator('#infinity-value');
		await expect(infinityValue, 'is visible').toBeVisible();
		await expect(infinityValue).toHaveText('Infinity');
// ... (86 more lines)

Domain

Dependencies

Frequently Asked Questions

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