Home / File/ web-analytics.test.js — astro Source File

web-analytics.test.js — astro Source File

Architecture documentation for web-analytics.test.js, a javascript file in the astro codebase. 4 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  cc9c88e3_4628_e1f3_ab8d_bf0c919b60cc["web-analytics.test.js"]
  81c783ff_7259_703c_7bdc_c78ff183642d["test-utils.js"]
  cc9c88e3_4628_e1f3_ab8d_bf0c919b60cc --> 81c783ff_7259_703c_7bdc_c78ff183642d
  f0817fb3_f192_bfcf_f1b0_c1a429dad07b["loadFixture"]
  cc9c88e3_4628_e1f3_ab8d_bf0c919b60cc --> f0817fb3_f192_bfcf_f1b0_c1a429dad07b
  e1e2fac7_5a95_7a88_cb1e_0a3b91c4e607["strict"]
  cc9c88e3_4628_e1f3_ab8d_bf0c919b60cc --> e1e2fac7_5a95_7a88_cb1e_0a3b91c4e607
  6b0635f9_51ea_77aa_767b_7857878e98a6["node:test"]
  cc9c88e3_4628_e1f3_ab8d_bf0c919b60cc --> 6b0635f9_51ea_77aa_767b_7857878e98a6
  style cc9c88e3_4628_e1f3_ab8d_bf0c919b60cc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

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

describe('Vercel Web Analytics', () => {
	describe('output: static', () => {
		/** @type {import('./test-utils.js').Fixture} */
		let fixture;

		before(async () => {
			fixture = await loadFixture({
				root: './fixtures/with-web-analytics-enabled/output-as-static/',
				output: 'static',
			});
			await fixture.build();
		});

		it('ensures that Vercel Web Analytics is present in the header', async () => {
			const pageOne = await fixture.readFile('../.vercel/output/static/one/index.html');
			const pageTwo = await fixture.readFile('../.vercel/output/static/two/index.html');

			assert.match(pageOne, /\/_vercel\/insights\/script.js/);
			assert.match(pageTwo, /\/_vercel\/insights\/script.js/);
		});
	});
});

Domain

Dependencies

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free