has.test.js — astro Source File
Architecture documentation for has.test.js, a javascript file in the astro codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 2b6caa88_dac3_9955_580a_76f8927719a7["has.test.js"] d27b776e_9007_01ab_576b_331e951728d4["../../../dist/core/cookies/index.js"] 2b6caa88_dac3_9955_580a_76f8927719a7 --> d27b776e_9007_01ab_576b_331e951728d4 e1e2fac7_5a95_7a88_cb1e_0a3b91c4e607["strict"] 2b6caa88_dac3_9955_580a_76f8927719a7 --> e1e2fac7_5a95_7a88_cb1e_0a3b91c4e607 6b0635f9_51ea_77aa_767b_7857878e98a6["node:test"] 2b6caa88_dac3_9955_580a_76f8927719a7 --> 6b0635f9_51ea_77aa_767b_7857878e98a6 style 2b6caa88_dac3_9955_580a_76f8927719a7 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import * as assert from 'node:assert/strict';
import { describe, it } from 'node:test';
import { AstroCookies } from '../../../dist/core/cookies/index.js';
describe('astro/src/core/cookies', () => {
describe('Astro.cookies.has', () => {
it('returns true if the request has the cookie', () => {
let req = new Request('http://example.com/', {
headers: {
cookie: 'foo=bar',
},
});
let cookies = new AstroCookies(req);
assert.equal(cookies.has('foo'), true);
});
it('returns false if the request does not have the cookie', () => {
let req = new Request('http://example.com/');
let cookies = new AstroCookies(req);
assert.equal(cookies.has('foo'), false);
});
it('returns true if the cookie has been set', () => {
let req = new Request('http://example.com/');
let cookies = new AstroCookies(req);
cookies.set('foo', 'bar');
assert.equal(cookies.has('foo'), true);
});
});
});
Domain
Dependencies
- ../../../dist/core/cookies/index.js
- node:test
- strict
Source
Frequently Asked Questions
What does has.test.js do?
has.test.js is a source file in the astro codebase, written in javascript. It belongs to the IntegrationAdapters domain.
What does has.test.js depend on?
has.test.js imports 3 module(s): ../../../dist/core/cookies/index.js, node:test, strict.
Where is has.test.js in the architecture?
has.test.js is located at packages/astro/test/units/cookies/has.test.js (domain: IntegrationAdapters, directory: packages/astro/test/units/cookies).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free