Home / File/ well-known-locations.test.js — astro Source File

well-known-locations.test.js — astro Source File

Architecture documentation for well-known-locations.test.js, a javascript file in the astro codebase. 5 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  78929352_861c_01b8_20c7_ec734ddf5ccb["well-known-locations.test.js"]
  760b1776_8858_e3bd_06b8_5cc4c1a9cbdc["../dist/index.js"]
  78929352_861c_01b8_20c7_ec734ddf5ccb --> 760b1776_8858_e3bd_06b8_5cc4c1a9cbdc
  ff334e41_2760_839e_fc38_ab9318c18dfc["test-utils.js"]
  78929352_861c_01b8_20c7_ec734ddf5ccb --> ff334e41_2760_839e_fc38_ab9318c18dfc
  0b7a6b11_e910_da4b_c617_1880167f44ef["loadFixture"]
  78929352_861c_01b8_20c7_ec734ddf5ccb --> 0b7a6b11_e910_da4b_c617_1880167f44ef
  e1e2fac7_5a95_7a88_cb1e_0a3b91c4e607["strict"]
  78929352_861c_01b8_20c7_ec734ddf5ccb --> e1e2fac7_5a95_7a88_cb1e_0a3b91c4e607
  6b0635f9_51ea_77aa_767b_7857878e98a6["node:test"]
  78929352_861c_01b8_20c7_ec734ddf5ccb --> 6b0635f9_51ea_77aa_767b_7857878e98a6
  style 78929352_861c_01b8_20c7_ec734ddf5ccb 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 nodejs from '../dist/index.js';
import { loadFixture } from './test-utils.js';

describe('test URIs beginning with a dot', () => {
	/** @type {import('./test-utils').Fixture} */
	let fixture;

	before(async () => {
		fixture = await loadFixture({
			root: './fixtures/well-known-locations/',
			output: 'server',
			adapter: nodejs({ mode: 'standalone' }),
		});
		await fixture.build();
	});

	describe('can load well-known URIs', async () => {
		let devPreview;

		before(async () => {
			devPreview = await fixture.preview();
		});

		after(async () => {
			await devPreview.stop();
		});

		it('can load a valid well-known URI', async () => {
			const res = await fixture.fetch('/.well-known/apple-app-site-association');

			assert.equal(res.status, 200);

			const json = await res.json();

			assert.notEqual(json.applinks, {});
		});

		it('cannot load a dot folder that is not a well-known URI', async () => {
			const res = await fixture.fetch('/.hidden/file.json');

			assert.equal(res.status, 404);
		});
	});
});

Domain

Dependencies

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free