Skip to content

Commit

Permalink
docs: links to video course
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Dec 15, 2022
1 parent d9fb2b7 commit 0967b24
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/.vitepress/components.d.ts
Expand Up @@ -8,6 +8,7 @@ export {}
declare module '@vue/runtime-core' {
export interface GlobalComponents {
Contributors: typeof import('./components/Contributors.vue')['default']
CourseLink: typeof import('./components/CourseLink.vue')['default']
FeaturesList: typeof import('./components/FeaturesList.vue')['default']
HomePage: typeof import('./components/HomePage.vue')['default']
ListItem: typeof import('./components/ListItem.vue')['default']
Expand Down
12 changes: 12 additions & 0 deletions docs/.vitepress/components/CourseLink.vue
@@ -0,0 +1,12 @@
<script setup lang="ts">
defineProps<{
href: string
}>()
</script>

<template>
<a :href="href" target="_blank" bg-green:10 px4 py3 rounded block mt2 flex items-center gap2>
<div i-carbon:play-filled flex-none text-lg />
<slot />
</a>
</template>
3 changes: 3 additions & 0 deletions docs/guide/features.md
Expand Up @@ -7,6 +7,9 @@ outline: deep

<FeaturesList class="!gap-1 text-lg" />

<div h-2 />
<CourseLink href="https://vueschool.io/lessons/your-first-test?friend=vueuse">Learn how to write your first test by Video</CourseLink>

## Shared config between test, dev and build

Vite's config, transformers, resolvers, and plugins. Use the same setup from your app to run the tests.
Expand Down
2 changes: 2 additions & 0 deletions docs/guide/index.md
Expand Up @@ -16,6 +16,8 @@ You can try Vitest online on [StackBlitz](https://vitest.new). It runs Vitest di

## Adding Vitest to your Project

<CourseLink href="https://vueschool.io/lessons/how-to-install-vitest?friend=vueuse">Learn how to install by Video</CourseLink>

With npm
```bash
npm install -D vitest
Expand Down
2 changes: 2 additions & 0 deletions docs/guide/snapshot.md
Expand Up @@ -4,6 +4,8 @@ title: Snapshot | Guide

# Snapshot

<CourseLink href="https://vueschool.io/lessons/snapshots-in-vitest?friend=vueuse">Learn Snapshot by video from Vue School</CourseLink>

Snapshot tests are a very useful tool whenever you want to make sure the output of your functions does not change unexpectedly.

When using snapshot, Vitest will take a snapshot of the given value, then compares it to a reference snapshot file stored alongside the test. The test will fail if the two snapshots do not match: either the change is unexpected, or the reference snapshot needs to be updated to the new version of the result.
Expand Down

0 comments on commit 0967b24

Please sign in to comment.