dev-routing.test.js — astro Source File
Architecture documentation for dev-routing.test.js, a javascript file in the astro codebase. 4 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 78b72f08_ef65_7b66_3fad_b40c50f3f770["dev-routing.test.js"] 0a624eac_945e_c9e8_c9de_3feb9de2dd15["test-utils.js"] 78b72f08_ef65_7b66_3fad_b40c50f3f770 --> 0a624eac_945e_c9e8_c9de_3feb9de2dd15 dd4f09ce_3fd7_8295_f616_8876cda4555c["loadFixture"] 78b72f08_ef65_7b66_3fad_b40c50f3f770 --> dd4f09ce_3fd7_8295_f616_8876cda4555c e1e2fac7_5a95_7a88_cb1e_0a3b91c4e607["strict"] 78b72f08_ef65_7b66_3fad_b40c50f3f770 --> e1e2fac7_5a95_7a88_cb1e_0a3b91c4e607 6b0635f9_51ea_77aa_767b_7857878e98a6["node:test"] 78b72f08_ef65_7b66_3fad_b40c50f3f770 --> 6b0635f9_51ea_77aa_767b_7857878e98a6 style 78b72f08_ef65_7b66_3fad_b40c50f3f770 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import assert from 'node:assert/strict';
import { after, before, describe, it } from 'node:test';
import { loadFixture } from './test-utils.js';
describe('Development Routing', () => {
describe('No site config', () => {
/** @type {import('./test-utils').Fixture} */
let fixture;
/** @type {import('./test-utils').DevServer} */
let devServer;
before(async () => {
fixture = await loadFixture({ root: './fixtures/without-site-config/' });
devServer = await fixture.startDevServer();
});
after(async () => {
await devServer.stop();
});
it('200 when loading /', async () => {
const response = await fixture.fetch('/');
assert.equal(response.status, 200);
});
it('200 when loading non-UTF-8 file name', async () => {
const response = await fixture.fetch('/テスト');
assert.equal(response.status, 200);
});
it('200 when loading include space file name', async () => {
const response = await fixture.fetch('/te st');
assert.equal(response.status, 200);
});
it('200 when adding search params', async () => {
const response = await fixture.fetch('/?foo=bar');
assert.equal(response.status, 200);
});
it('200 when loading non-root page', async () => {
const response = await fixture.fetch('/another');
assert.equal(response.status, 200);
});
it('200 when loading dynamic route', async () => {
const response = await fixture.fetch('/1');
assert.equal(response.status, 200);
});
it('redirects when loading double slash', async () => {
const response = await fixture.fetch('//', { redirect: 'manual' });
assert.equal(response.status, 301);
assert.equal(response.headers.get('Location'), '/');
});
it('redirects when loading multiple slashes', async () => {
const response = await fixture.fetch('/////', { redirect: 'manual' });
assert.equal(response.status, 301);
assert.equal(response.headers.get('Location'), '/');
// ... (355 more lines)
Domain
Dependencies
- loadFixture
- node:test
- strict
- test-utils.js
Source
Frequently Asked Questions
What does dev-routing.test.js do?
dev-routing.test.js is a source file in the astro codebase, written in javascript. It belongs to the IntegrationAdapters domain.
What does dev-routing.test.js depend on?
dev-routing.test.js imports 4 module(s): loadFixture, node:test, strict, test-utils.js.
Where is dev-routing.test.js in the architecture?
dev-routing.test.js is located at packages/astro/test/dev-routing.test.js (domain: IntegrationAdapters, directory: packages/astro/test).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free