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

basic.test.ts — astro Source File

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

File typescript 1 imports

Entity Profile

Dependency Diagram

graph LR
  66a99ad2_49c0_ea52_21e0_df9c621fa39f["basic.test.ts"]
  3e3298c2_86dd_c820_c444_b15ecaad6b48["vitest"]
  66a99ad2_49c0_ea52_21e0_df9c621fa39f --> 3e3298c2_86dd_c820_c444_b15ecaad6b48
  style 66a99ad2_49c0_ea52_21e0_df9c621fa39f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { assert, expect, test } from 'vitest';

// Edit an assertion and save to see HMR in action

test('Math.sqrt()', () => {
	expect(Math.sqrt(4)).toBe(2);
	expect(Math.sqrt(144)).toBe(12);
	expect(Math.sqrt(2)).toBe(Math.SQRT2);
});

test('JSON', () => {
	const input = {
		foo: 'hello',
		bar: 'world',
	};

	const output = JSON.stringify(input);

	expect(output).eq('{"foo":"hello","bar":"world"}');
	assert.deepEqual(JSON.parse(output), input, 'matches original');
});

Dependencies

  • vitest

Frequently Asked Questions

What does basic.test.ts do?
basic.test.ts is a source file in the astro codebase, written in typescript.
What does basic.test.ts depend on?
basic.test.ts imports 1 module(s): vitest.
Where is basic.test.ts in the architecture?
basic.test.ts is located at examples/with-vitest/test/basic.test.ts (directory: examples/with-vitest/test).

Analyze Your Own Codebase

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

Try Supermodel Free