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

vitest.test.js — astro Source File

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

File javascript 4 imports

Entity Profile

Dependency Diagram

graph LR
  85194cf0_4729_9730_31d6_0a1e46853988["vitest.test.js"]
  e1e2fac7_5a95_7a88_cb1e_0a3b91c4e607["strict"]
  85194cf0_4729_9730_31d6_0a1e46853988 --> e1e2fac7_5a95_7a88_cb1e_0a3b91c4e607
  6b0635f9_51ea_77aa_767b_7857878e98a6["node:test"]
  85194cf0_4729_9730_31d6_0a1e46853988 --> 6b0635f9_51ea_77aa_767b_7857878e98a6
  d9a92db9_c95e_9165_13ac_24b3d859d946["node:url"]
  85194cf0_4729_9730_31d6_0a1e46853988 --> d9a92db9_c95e_9165_13ac_24b3d859d946
  e9879b8e_5922_412c_ece9_50ee040c527c["node"]
  85194cf0_4729_9730_31d6_0a1e46853988 --> e9879b8e_5922_412c_ece9_50ee040c527c
  style 85194cf0_4729_9730_31d6_0a1e46853988 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import assert from 'node:assert/strict';
import { after, before, describe, it } from 'node:test';
import { fileURLToPath } from 'node:url';
import { createVitest } from 'vitest/node';

describe('vitest', () => {
	let originalCwd;
	before(() => {
		originalCwd = process.cwd();
		// We chdir rather than setting the root in vitest, because otherwise it sets the wrong root in the site config
		process.chdir(fileURLToPath(new URL('./fixtures/vitest/', import.meta.url)));
	});

	it('basics', async () => {
		const vitest = await createVitest('test', {
			watch: false,
		});

		try {
			await vitest.start();
		} catch (_) {
			assert.ok(false, 'test failed');
		} finally {
			await vitest.close();
		}
	});

	after(() => {
		process.chdir(originalCwd);
	});
});

Dependencies

  • node
  • node:test
  • node:url
  • strict

Frequently Asked Questions

What does vitest.test.js do?
vitest.test.js is a source file in the astro codebase, written in javascript.
What does vitest.test.js depend on?
vitest.test.js imports 4 module(s): node, node:test, node:url, strict.
Where is vitest.test.js in the architecture?
vitest.test.js is located at packages/astro/test/vitest.test.js (directory: packages/astro/test).

Analyze Your Own Codebase

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

Try Supermodel Free