hosted.test.js — astro Source File
Architecture documentation for hosted.test.js, a javascript file in the astro codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR b9d05c70_0036_91a6_3b2c_3492355018a4["hosted.test.js"] 0e588d0c_5409_f008_bf3b_3762dd6c1c5a["strict"] b9d05c70_0036_91a6_3b2c_3492355018a4 --> 0e588d0c_5409_f008_bf3b_3762dd6c1c5a fa887d9d_247c_d770_d661_490745669024["node:test"] b9d05c70_0036_91a6_3b2c_3492355018a4 --> fa887d9d_247c_d770_d661_490745669024 style b9d05c70_0036_91a6_3b2c_3492355018a4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import * as assert from 'node:assert/strict';
import { describe, it } from 'node:test';
const NETLIFY_TEST_URL = 'https://curious-boba-495d6d.netlify.app';
describe('Hosted Netlify Tests', () => {
it('Image endpoint works', async () => {
const image = await fetch(
`${NETLIFY_TEST_URL}/_image?href=%2F_astro%2Fpenguin.e9c64733.png&w=300&f=webp`,
);
assert.equal(image.status, 200);
});
it('passes context from edge middleware', async () => {
const response = await fetch(`${NETLIFY_TEST_URL}/country`);
const body = await response.text();
assert.match(body, /has context/);
assert.match(body, /Deno/);
});
it('Server returns fresh content', async () => {
const responseOne = await fetch(`${NETLIFY_TEST_URL}/time`).then((res) => res.text());
const responseTwo = await fetch(`${NETLIFY_TEST_URL}/time`).then((res) => res.text());
assert.notEqual(responseOne.body, responseTwo.body);
});
});
Dependencies
- node:test
- strict
Source
Frequently Asked Questions
What does hosted.test.js do?
hosted.test.js is a source file in the astro codebase, written in javascript.
What does hosted.test.js depend on?
hosted.test.js imports 2 module(s): node:test, strict.
Where is hosted.test.js in the architecture?
hosted.test.js is located at packages/integrations/netlify/test/hosted/hosted.test.js (directory: packages/integrations/netlify/test/hosted).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free