wrangler-preview-platform.test.js — astro Source File
Architecture documentation for wrangler-preview-platform.test.js, a javascript file in the astro codebase. 5 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR de1d0f6f_401b_5755_112c_d7c808dec250["wrangler-preview-platform.test.js"] 635e1221_67bb_e784_624a_d6d63643872b["_test-utils.js"] de1d0f6f_401b_5755_112c_d7c808dec250 --> 635e1221_67bb_e784_624a_d6d63643872b 33b9a01d_12ac_568f_9775_9e80b35139cb["loadFixture"] de1d0f6f_401b_5755_112c_d7c808dec250 --> 33b9a01d_12ac_568f_9775_9e80b35139cb e1e2fac7_5a95_7a88_cb1e_0a3b91c4e607["strict"] de1d0f6f_401b_5755_112c_d7c808dec250 --> e1e2fac7_5a95_7a88_cb1e_0a3b91c4e607 6b0635f9_51ea_77aa_767b_7857878e98a6["node:test"] de1d0f6f_401b_5755_112c_d7c808dec250 --> 6b0635f9_51ea_77aa_767b_7857878e98a6 deb87372_5629_35f8_9a54_e755a08f776a["cheerio"] de1d0f6f_401b_5755_112c_d7c808dec250 --> deb87372_5629_35f8_9a54_e755a08f776a style de1d0f6f_401b_5755_112c_d7c808dec250 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 * as cheerio from 'cheerio';
import { loadFixture } from './_test-utils.js';
describe('WranglerPreviewPlatform', () => {
let fixture;
let previewServer;
before(async () => {
fixture = await loadFixture({
root: './fixtures/wrangler-preview-platform/',
});
await fixture.build();
previewServer = await fixture.preview();
});
after(async () => {
previewServer.stop();
});
it('exists', async () => {
const res = await fixture.fetch('/');
const html = await res.text();
const $ = cheerio.load(html);
assert.equal($('#hasRuntime').text().includes('true'), true);
});
it('has environment variables', async () => {
const res = await fixture.fetch('/');
const html = await res.text();
const $ = cheerio.load(html);
assert.equal($('#hasENV').text().includes('true'), true);
});
it('has Cloudflare request object', async () => {
const res = await fixture.fetch('/');
const html = await res.text();
const $ = cheerio.load(html);
assert.equal($('#hasCF').text().includes('true'), true);
});
it('has Cloudflare cache', async () => {
const res = await fixture.fetch('/');
const html = await res.text();
const $ = cheerio.load(html);
assert.equal($('#hasCACHES').text().includes('true'), true);
});
});
Domain
Dependencies
- _test-utils.js
- cheerio
- loadFixture
- node:test
- strict
Source
Frequently Asked Questions
What does wrangler-preview-platform.test.js do?
wrangler-preview-platform.test.js is a source file in the astro codebase, written in javascript. It belongs to the CoreAstro domain.
What does wrangler-preview-platform.test.js depend on?
wrangler-preview-platform.test.js imports 5 module(s): _test-utils.js, cheerio, loadFixture, node:test, strict.
Where is wrangler-preview-platform.test.js in the architecture?
wrangler-preview-platform.test.js is located at packages/integrations/cloudflare/test/wrangler-preview-platform.test.js (domain: CoreAstro, directory: packages/integrations/cloudflare/test).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free