Home / File/ error.test.js — astro Source File

error.test.js — astro Source File

Architecture documentation for error.test.js, a javascript file in the astro codebase. 3 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  37d324f0_f2d8_9311_001c_bfd1d1cda16e["error.test.js"]
  d27b776e_9007_01ab_576b_331e951728d4["../../../dist/core/cookies/index.js"]
  37d324f0_f2d8_9311_001c_bfd1d1cda16e --> d27b776e_9007_01ab_576b_331e951728d4
  e1e2fac7_5a95_7a88_cb1e_0a3b91c4e607["strict"]
  37d324f0_f2d8_9311_001c_bfd1d1cda16e --> e1e2fac7_5a95_7a88_cb1e_0a3b91c4e607
  6b0635f9_51ea_77aa_767b_7857878e98a6["node:test"]
  37d324f0_f2d8_9311_001c_bfd1d1cda16e --> 6b0635f9_51ea_77aa_767b_7857878e98a6
  style 37d324f0_f2d8_9311_001c_bfd1d1cda16e 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('errors', () => {
		it('Produces an error if the response is already sent', () => {
			const req = new Request('http://example.com/', {});
			const cookies = new AstroCookies(req);
			req[Symbol.for('astro.responseSent')] = true;
			try {
				cookies.set('foo', 'bar');
				assert.equal(false, true);
			} catch (err) {
				assert.equal(err.name, 'ResponseSentError');
			}
		});
	});
});

Dependencies

  • ../../../dist/core/cookies/index.js
  • node:test
  • strict

Frequently Asked Questions

What does error.test.js do?
error.test.js is a source file in the astro codebase, written in javascript. It belongs to the IntegrationAdapters domain.
What does error.test.js depend on?
error.test.js imports 3 module(s): ../../../dist/core/cookies/index.js, node:test, strict.
Where is error.test.js in the architecture?
error.test.js is located at packages/astro/test/units/cookies/error.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