Skip to content

Commit

Permalink
docs(fr): improved docs with the latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoine ZANARDI committed Feb 23, 2023
2 parents bf0ebd8 + 52b25f4 commit 3aa53a8
Show file tree
Hide file tree
Showing 40 changed files with 1,921 additions and 1,125 deletions.
95 changes: 93 additions & 2 deletions docs/.vitepress/config.ts
@@ -1,6 +1,5 @@
import { defineConfig } from 'vitepress';
import { frLocaleConfig } from "../fr/.vitepress/locale-config";
import packageJSON from '../../package.json';

export default defineConfig({
title: `Vue Test Utils`,
Expand All @@ -15,7 +14,7 @@ export default defineConfig({
label: "Français",
title: "Vue Test Utils",
lang: "fr-FR",
description: "La librairie officielle de Vue Test Utils",
description: "La documentation officielle de Vue Test Utils",
},
},
head: [['link', { rel: 'icon', href: `/logo.png` }]],
Expand Down Expand Up @@ -131,5 +130,97 @@ export default defineConfig({
facetFilters: ['tags:next']
}
},
nav: [
{ text: 'Guide', link: '/guide/' },
{ text: 'API Reference', link: '/api/' },
{ text: 'Migrating from Vue 2', link: '/migration/' },
{
text: 'Changelog',
link: 'https://github.com/vuejs/test-utils/releases'
}
],
sidebar: [
{
text: 'Installation',
link: '/installation/'
},
{
text: 'Essentials',
collapsable: false,
children: [
{ text: 'Getting Started', link: '/guide/' },
{ text: 'A Crash Course', link: '/guide/essentials/a-crash-course' },
{
text: 'Conditional Rendering',
link: '/guide/essentials/conditional-rendering'
},
{
text: 'Testing Emitted Events',
link: '/guide/essentials/event-handling'
},
{ text: 'Testing Forms', link: '/guide/essentials/forms' },
{
text: 'Passing Data to Components',
link: '/guide/essentials/passing-data'
},
{
text: 'Write components that are easy to test',
link: '/guide/essentials/easy-to-test'
}
]
},
{
text: 'Vue Test Utils in depth',
collapsable: false,
children: [
{ text: 'Slots', link: '/guide/advanced/slots' },
{
text: 'Asynchronous Behavior',
link: '/guide/advanced/async-suspense'
},
{
text: 'Making HTTP Requests',
link: '/guide/advanced/http-requests'
},
{ text: 'Transitions', link: '/guide/advanced/transitions' },
{
text: 'Component Instance',
link: '/guide/advanced/component-instance'
},
{
text: 'Reusability and Composition',
link: '/guide/advanced/reusability-composition'
},
{ text: 'Testing v-model', link: '/guide/advanced/v-model' },
{ text: 'Testing Vuex', link: '/guide/advanced/vuex' },
{ text: 'Testing Vue Router', link: '/guide/advanced/vue-router' },
{ text: 'Testing Teleport', link: '/guide/advanced/teleport' },
{
text: 'Stubs and Shallow Mount',
link: '/guide/advanced/stubs-shallow-mount'
},
{ text: 'Server-side rendering', link: '/guide/advanced/ssr' }
]
},
{
text: 'Extending Vue Test Utils',
collapsable: false,
children: [
{ text: 'Plugins', link: '/guide/extending-vtu/plugins' },
{
text: 'Community and Learning',
link: '/guide/extending-vtu/community-learning'
}
]
},
{
text: 'Migrating from Vue 2',
link: '/migration/'
},
{
text: 'API Reference',
link: '/api/'
}
]
}
})
8 changes: 4 additions & 4 deletions docs/api/index.md
Expand Up @@ -1960,11 +1960,11 @@ An example might be globally mocking the `$t` variable from vue-i18n and a compo
</template>

<script>
import MonComposant from '@/components/MonComposant'
import MyComponent from '@/components/MyComponent'

export default {
components: {
MonComposant
MyComponent
}
}
</script>
Expand All @@ -1976,12 +1976,12 @@ export default {
import { config, mount } from '@vue/test-utils'
import { defineComponent } from 'vue'

const MonComposant = defineComponent({
const MyComponent = defineComponent({
template: `<div>My component</div>`
})

config.global.stubs = {
MonComposant
MyComponent
}

config.global.mocks = {
Expand Down
3 changes: 2 additions & 1 deletion docs/fr/.vitepress/locale-config.ts
Expand Up @@ -71,7 +71,8 @@ const frLocaleConfig: DefaultTheme.LocaleConfig & Omit<DefaultTheme.Config, "loc
{
text: 'Composants de Substitution (Stubs) et Montage Partiel',
link: '/fr/guide/advanced/stubs-shallow-mount'
}
},
{ text: 'Tester le Rendu côté Serveur (SSR)', link: '/fr/guide/advanced/ssr' }
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/fr/README.md
Expand Up @@ -19,7 +19,7 @@ Voir la [documentation](https://test-utils.vuejs.org/fr).

## Développement

Commencez en exécutant la commande `pnpm install`. Vous pouvez exécuter les tests avec la commande `pnpm test`. C'est tout !
Commencez en exécutant la commande `pnpm install`. Vous pouvez exécuter les tests avec la commande `pnpm test`. C'est tout&nbsp;!

## Comparaison avec Vue Test Utils v1 (qui cible Vue 2)

Expand Down

0 comments on commit 3aa53a8

Please sign in to comment.