snapShotTest() — astro Function Reference
Architecture documentation for the snapShotTest() function in test.mjs from the astro codebase.
Entity Profile
Dependency Diagram
graph TD a82e4dba_bd27_8c48_ef19_a76e00d2f35f["snapShotTest()"] 783c19dd_dc8f_7f70_13d3_d14c83e05c68["test.mjs"] a82e4dba_bd27_8c48_ef19_a76e00d2f35f -->|defined in| 783c19dd_dc8f_7f70_13d3_d14c83e05c68 f3c37e47_2b5e_f6a6_a62f_979fc60ac5f0["promisifySpawn()"] a82e4dba_bd27_8c48_ef19_a76e00d2f35f -->|calls| f3c37e47_2b5e_f6a6_a62f_979fc60ac5f0 style a82e4dba_bd27_8c48_ef19_a76e00d2f35f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/language-tools/vscode/test/grammar/test.mjs lines 36–57
async function snapShotTest() {
const extraArgs = process.argv.slice(2);
const isWindows = process.platform === 'win32';
const args = [
'vscode-tmgrammar-snap',
'-s',
'source.astro',
'./test/grammar/fixtures/**/*.astro',
...allGrammars.reduce((/** @type string[] */ previous, path) => [...previous, '-g', path], []),
...extraArgs,
].map((arg) => (isWindows && arg.includes(' ') ? `"${arg}"` : arg));
const code = await promisifySpawn(isWindows ? 'pnpm.cmd' : 'pnpm', args, {
stdio: 'inherit',
shell: isWindows,
});
if (code && code > 0) {
process.exit(code);
}
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does snapShotTest() do?
snapShotTest() is a function in the astro codebase, defined in packages/language-tools/vscode/test/grammar/test.mjs.
Where is snapShotTest() defined?
snapShotTest() is defined in packages/language-tools/vscode/test/grammar/test.mjs at line 36.
What does snapShotTest() call?
snapShotTest() calls 1 function(s): promisifySpawn.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free