ssr-prerender-get-static-paths.test.js — astro Source File
Architecture documentation for ssr-prerender-get-static-paths.test.js, a javascript file in the astro codebase. 6 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 1638f0e4_66a3_04b0_d45c_e8d6c9221bbb["ssr-prerender-get-static-paths.test.js"] be670a78_841c_46e5_0af5_c5c328869ecb["test-adapter.js"] 1638f0e4_66a3_04b0_d45c_e8d6c9221bbb --> be670a78_841c_46e5_0af5_c5c328869ecb 0a624eac_945e_c9e8_c9de_3feb9de2dd15["test-utils.js"] 1638f0e4_66a3_04b0_d45c_e8d6c9221bbb --> 0a624eac_945e_c9e8_c9de_3feb9de2dd15 dd4f09ce_3fd7_8295_f616_8876cda4555c["loadFixture"] 1638f0e4_66a3_04b0_d45c_e8d6c9221bbb --> dd4f09ce_3fd7_8295_f616_8876cda4555c e1e2fac7_5a95_7a88_cb1e_0a3b91c4e607["strict"] 1638f0e4_66a3_04b0_d45c_e8d6c9221bbb --> e1e2fac7_5a95_7a88_cb1e_0a3b91c4e607 6b0635f9_51ea_77aa_767b_7857878e98a6["node:test"] 1638f0e4_66a3_04b0_d45c_e8d6c9221bbb --> 6b0635f9_51ea_77aa_767b_7857878e98a6 deb87372_5629_35f8_9a54_e755a08f776a["cheerio"] 1638f0e4_66a3_04b0_d45c_e8d6c9221bbb --> deb87372_5629_35f8_9a54_e755a08f776a style 1638f0e4_66a3_04b0_d45c_e8d6c9221bbb fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import assert from 'node:assert/strict';
import { after, afterEach, before, describe, it } from 'node:test';
import * as cheerio from 'cheerio';
import testAdapter from './test-adapter.js';
import { loadFixture } from './test-utils.js';
describe('Prerender', () => {
/** @type {import('./test-utils').Fixture} */
let fixture;
describe('output: "server"', () => {
describe('getStaticPaths - build calls', () => {
before(async () => {
fixture = await loadFixture({
root: './fixtures/ssr-prerender-get-static-paths/',
site: 'https://mysite.dev/',
adapter: testAdapter(),
base: '/blog',
output: 'server',
});
await fixture.build();
});
after(async () => {
await fixture.clean();
});
afterEach(() => {
// reset the flag used by [...calledTwiceTest].astro between each test
globalThis.isCalledOnce = false;
});
it('is only called once during build', () => {
// useless expect; if build() throws in setup then this test fails
assert.equal(true, true);
});
it('Astro.url sets the current pathname', async () => {
const html = await fixture.readFile('/client/food/tacos/index.html');
const $ = cheerio.load(html);
assert.equal($('#props').text(), '10');
assert.equal($('#url').text(), '/blog/food/tacos/');
});
});
describe('getStaticPaths - dev calls', () => {
let devServer;
before(async () => {
globalThis.isCalledOnce = false;
devServer = await fixture.startDevServer();
});
afterEach(() => {
// reset the flag used by [...calledTwiceTest].astro between each test
globalThis.isCalledOnce = false;
});
after(async () => {
await devServer.stop();
// ... (199 more lines)
Domain
Subdomains
Functions
Dependencies
- cheerio
- loadFixture
- node:test
- strict
- test-adapter.js
- test-utils.js
Source
Frequently Asked Questions
What does ssr-prerender-get-static-paths.test.js do?
ssr-prerender-get-static-paths.test.js is a source file in the astro codebase, written in javascript. It belongs to the IntegrationAdapters domain, SsrAdapters subdomain.
What functions are defined in ssr-prerender-get-static-paths.test.js?
ssr-prerender-get-static-paths.test.js defines 1 function(s): vitePluginRemovePrerenderExport.
What does ssr-prerender-get-static-paths.test.js depend on?
ssr-prerender-get-static-paths.test.js imports 6 module(s): cheerio, loadFixture, node:test, strict, test-adapter.js, test-utils.js.
Where is ssr-prerender-get-static-paths.test.js in the architecture?
ssr-prerender-get-static-paths.test.js is located at packages/astro/test/ssr-prerender-get-static-paths.test.js (domain: IntegrationAdapters, subdomain: SsrAdapters, directory: packages/astro/test).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free