Home / File/ parseArgs.test.ts — astro Source File

parseArgs.test.ts — astro Source File

Architecture documentation for parseArgs.test.ts, a typescript file in the astro codebase. 3 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  22d45ea9_2dc4_a6cd_4ce4_e8b4231c1c48["parseArgs.test.ts"]
  03430674_757c_a0c4_8f39_e18b0e9676b9["../dist/index.js"]
  22d45ea9_2dc4_a6cd_4ce4_e8b4231c1c48 --> 03430674_757c_a0c4_8f39_e18b0e9676b9
  db323e8c_04ef_9777_0487_224de5819a30["node:assert"]
  22d45ea9_2dc4_a6cd_4ce4_e8b4231c1c48 --> db323e8c_04ef_9777_0487_224de5819a30
  6b0635f9_51ea_77aa_767b_7857878e98a6["node:test"]
  22d45ea9_2dc4_a6cd_4ce4_e8b4231c1c48 --> 6b0635f9_51ea_77aa_767b_7857878e98a6
  style 22d45ea9_2dc4_a6cd_4ce4_e8b4231c1c48 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import assert from 'node:assert';
import { describe, it } from 'node:test';
import { parseArgsAsCheckConfig } from '../dist/index.js';

describe('astro-check - Arguments parser', async () => {
	it('Can parse an empty array', async () => {
		const result = parseArgsAsCheckConfig([]);

		assert.strictEqual(result.watch, false);
		assert.strictEqual(result.tsconfig, undefined);
		assert.strictEqual(result.minimumSeverity, 'hint');
		assert.strictEqual(result.preserveWatchOutput, false);
	});

	it('Can parse boolean', async () => {
		const result = parseArgsAsCheckConfig(['', '', '--watch', '--preserveWatchOutput']);
		assert.strictEqual(result.watch, true);
		assert.strictEqual(result.preserveWatchOutput, true);
	});

	it('Can parse string', async () => {
		const result = parseArgsAsCheckConfig(['', '', '--root', 'foo']);
		assert.strictEqual(result.root, 'foo');
	});

	it('Can parse string with choice', async () => {
		const result = parseArgsAsCheckConfig(['', '', '--minimumSeverity', 'error']);
		assert.strictEqual(result.minimumSeverity, 'error');
	});
});

Domain

Dependencies

  • ../dist/index.js
  • node:assert
  • node:test

Frequently Asked Questions

What does parseArgs.test.ts do?
parseArgs.test.ts is a source file in the astro codebase, written in typescript. It belongs to the CoreAstro domain.
What does parseArgs.test.ts depend on?
parseArgs.test.ts imports 3 module(s): ../dist/index.js, node:assert, node:test.
Where is parseArgs.test.ts in the architecture?
parseArgs.test.ts is located at packages/language-tools/astro-check/test/parseArgs.test.ts (domain: CoreAstro, directory: packages/language-tools/astro-check/test).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free