# Astro with Vitest

import DocButton from '~/components/webkit/DocButton.vue';
import SectionBasicContent from '~/components/SectionBasicContent/SectionBasicContent.vue';
import Container from '~/components/webkit/Container.vue';

<SectionBasicContent
  description="The Astro with Vitest template deploys a new application based on Astro working with Vitest, a blazing fast unit test framework powered by Vite. This template combines Astro's static site generation with Vitest's efficient testing capabilities, enabling you to write and run tests with minimal configuration."
  buttons={[
    { label: "Deploy template", link: "https://console.azion.com/create/astro/astro-with-vitest", outlined: false, icon: "ai ai-azion", iconPos: "left" },
    { label: "View demo", link: "https://haf81czn8k.map.azionedge.net/", severity: "secondary" }
  ]}
>
  <Fragment slot="content">
    <div style="flex: 1; min-width: 300px;">
      | Item | Details |
      |:----------|:------|
      | Repository | [Azion Samples](https://github.com/aziontech/azion-samples/tree/dev/templates/astro/astro-with-vitest) |
      | Framework | [Astro](/en/documentation/products/devtools/azion-edge-runtime/frameworks-compatibility/astro/) |
      | Use Case | General |
    </div>
    <div style="display: flex; justify-content: center; align-items: center; flex: 1;">
      <img src="/assets/docs/images/uploads/template-showcase/astro/astro-vitest.png" width="400" alt="Astro with vitest" style="min-width: 100%; max-width: 100%; height: auto;" />
    </div>
  </Fragment>
</SectionBasicContent>

## About this template

This template is built with [Astro](/en/documentation/products/devtools/azion-edge-runtime/frameworks-compatibility/astro/) and wires up Vitest, a fast unit test runner powered by Vite. It includes a working test setup so you can validate components and logic from day one and keep your project reliable as it grows. Deployed on Azion, it's served via a distributed architecture for fast, globally distributed delivery.

## Key features

- Vitest preconfigured for unit testing with minimal setup
- Fast, Vite-powered test runs with watch mode for quick feedback
- Example tests that show how to validate Astro components and logic
- Edge-optimized delivery through Azion for low-latency access worldwide