utils.js — astro Source File
Architecture documentation for utils.js, a javascript file in the astro codebase. 3 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR aa0dae79_bb0f_5dbc_a862_ff5861034ff3["utils.js"] fd1d7b5a_556e_db2a_f950_007d252bd6c8["../dist/index.js"] aa0dae79_bb0f_5dbc_a862_ff5861034ff3 --> fd1d7b5a_556e_db2a_f950_007d252bd6c8 6b0635f9_51ea_77aa_767b_7857878e98a6["node:test"] aa0dae79_bb0f_5dbc_a862_ff5861034ff3 --> 6b0635f9_51ea_77aa_767b_7857878e98a6 b4a76fc8_3591_85b4_7b57_55ab21d1030d["node:util"] aa0dae79_bb0f_5dbc_a862_ff5861034ff3 --> b4a76fc8_3591_85b4_7b57_55ab21d1030d 76af4701_ab63_c9a7_3067_8cd7b81b32de["install.test.js"] 76af4701_ab63_c9a7_3067_8cd7b81b32de --> aa0dae79_bb0f_5dbc_a862_ff5861034ff3 style aa0dae79_bb0f_5dbc_a862_ff5861034ff3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { before, beforeEach } from 'node:test';
import { stripVTControlCharacters } from 'node:util';
import { setStdout } from '../dist/index.js';
export function setup() {
const ctx = { messages: [] };
before(() => {
setStdout(
Object.assign({}, process.stdout, {
write(buf) {
ctx.messages.push(stripVTControlCharacters(String(buf)).trim());
return true;
},
}),
);
});
beforeEach(() => {
ctx.messages = [];
});
return {
messages() {
return ctx.messages;
},
length() {
return ctx.messages.length;
},
hasMessage(content) {
return !!ctx.messages.find((msg) => msg.includes(content));
},
};
}
Domain
Subdomains
Functions
Dependencies
- ../dist/index.js
- node:test
- node:util
Imported By
Source
Frequently Asked Questions
What does utils.js do?
utils.js is a source file in the astro codebase, written in javascript. It belongs to the CoreAstro domain, CoreMiddleware subdomain.
What functions are defined in utils.js?
utils.js defines 1 function(s): setup.
What does utils.js depend on?
utils.js imports 3 module(s): ../dist/index.js, node:test, node:util.
What files import utils.js?
utils.js is imported by 1 file(s): install.test.js.
Where is utils.js in the architecture?
utils.js is located at packages/upgrade/test/utils.js (domain: CoreAstro, subdomain: CoreMiddleware, directory: packages/upgrade/test).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free