Skip to content

Guide: choosing-a-test-runner.md #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 5, 2017
Merged

Guide: choosing-a-test-runner.md #10

merged 5 commits into from
Nov 5, 2017

Conversation

Yaty
Copy link

@Yaty Yaty commented Oct 15, 2017

No description provided.

Copy link
Member

@MachinisteWeb MachinisteWeb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bon boulot ! Quelques remarques !


There are many popular JavaScript test runners, and `vue-test-utils` works with all of them. It's test runner agnostic.
Il y a un nombre conséquent de lanceurs de tests JavaScript et `vue-test-utils` marche avec tous ceux d'entre eux. `vue-test-utils` est agnostique de lanceurs de tests.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

est agnostique en terme de lanceurs de test


There are a few things to consider when choosing a test runner though: feature set, performance, and support for single-file component (SFC) pre-compilation. After carefully comparing existing libraries, here are two test runners that we recommend:
Il y a tout de même plusieurs choses à considérer afin de choisir un lanceur de tests : variété des fonctionnalités, performance et support de la pré-compilation des composants monofichiers (SFC). Après avoir cautionnement analysé et comparé les bibliothèques, il y a deux lanceurs de tests que nous recommandons :
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(« SFC »)

Je suis d'avis qu'il est tellement pas populaire se terme que je sais pas s'il y a un intéret de le préciser (en général on précise ça si on traduit un terme populaire en anglais genre « end-to-end » ou « bundle » ou « SPA » mais SFC... inconnu au bataillon :D


- [Jest](https://facebook.github.io/jest/docs/en/getting-started.html#content) is the most fully featured test runner. It requires the least configuration, sets up JSDOM by default, provides built-in assertions, and has a great command line user experience. However, you will need a preprocessor to be able to import SFC components in your tests. We have created the `jest-vue` preprocessor which can handle most common SFC features, but it currently does not have 100% feature parity with `vue-loader`.
- [Jest](https://facebook.github.io/jest/docs/en/getting-started.html#content) est le lanceur de test le plus complet en terme de fonctionnalités. Il requiert une configuration minimale, installe JSDOM par défaut, fournit des assertions prêtes à l'usage et a une très bonne interface en ligne de commandes. Cependant, vous allez avoir besoin d'un pré-processeur afin d'être capable d'importer les composants monofichiers dans nos tests. On a créé le préprocesseur `jest-vue` qui peut gérer les fonctionnalités communes des composants monofichiers. Il n'y a cependant pas encore autant de fonctionnalités que vue-loader.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prêtes à l'utilisation

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dans vos test

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

préprocesseur


Single-file Vue components (SFCs) require pre-compilation before they can be run in Node or in the browser. There are two recommended ways to perform the compilation: with a Jest preprocessor, or directly use webpack.
Les composants Vue monofichiers (SFC) nécessites une étape de pré-compilation avant qu'ils soient lancés dans Node ou sur un navigateur. Il y a deux manières de faire qui sont recommandées pour réaliser la compilation : avec un préprocesseur Jest ou directement en utilisant webpack.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Peut être pas pertinent de garder SFC, sinon (« SFC »)

Copy link

@forresst forresst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quelques erreurs ....


There are many popular JavaScript test runners, and `vue-test-utils` works with all of them. It's test runner agnostic.
Il y a un nombre conséquent de lanceurs de tests JavaScript et `vue-test-utils` marche avec tous ceux d'entre eux. `vue-test-utils` est agnostique en termne de lanceurs de tests.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

et vue-test-utils marche fonctionne avec tous ceux d'entre eux.


There are a few things to consider when choosing a test runner though: feature set, performance, and support for single-file component (SFC) pre-compilation. After carefully comparing existing libraries, here are two test runners that we recommend:
Il y a tout de même plusieurs choses à considérer afin de choisir un lanceur de tests : variété des fonctionnalités, performance et support de la précompilation des composants monofichiers. Après avoir cautionnement analysé et comparé les bibliothèques, il y a deux lanceurs de tests que nous recommandons :

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Après avoir cautionnement soigneusement analysé et comparé les bibliothèques,


- [Jest](https://facebook.github.io/jest/docs/en/getting-started.html#content) is the most fully featured test runner. It requires the least configuration, sets up JSDOM by default, provides built-in assertions, and has a great command line user experience. However, you will need a preprocessor to be able to import SFC components in your tests. We have created the `jest-vue` preprocessor which can handle most common SFC features, but it currently does not have 100% feature parity with `vue-loader`.
- [Jest](https://facebook.github.io/jest/docs/en/getting-started.html#content) est le lanceur de test le plus complet en termes de fonctionnalités. Il requiert une configuration minimale, installe JSDOM par défaut, fournit des assertions prêtes à l'utilisation et a une très bonne interface en ligne de commandes. Cependant, vous allez avoir besoin d'un préprocesseur afin d'être capable d'importer les composants monofichiers dans vos tests. On a créé le préprocesseur `jest-vue` qui peut gérer les fonctionnalités communes des composants monofichiers. Il n'y a cependant pas encore autant de fonctionnalités que vue-loader.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Il n'y a cependant pas encore => Il n'a cependant pas encore


Single-file Vue components (SFCs) require pre-compilation before they can be run in Node or in the browser. There are two recommended ways to perform the compilation: with a Jest preprocessor, or directly use webpack.
Les composants Vue monofichiers nécessites une étape de pré-compilation avant qu'ils soient lancés dans Node ou sur un navigateur. Il y a deux manières de faire qui sont recommandées pour réaliser la compilation : avec un préprocesseur Jest ou directement en utilisant webpack.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nécessites => nécessitent

Il y a deux manières de faire qui sont recommandées pour réaliser la compilation : => Il existe deux méthodes recommandées pour effectuer la compilation :

Copy link
Member

@MachinisteWeb MachinisteWeb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deux ajustement et ça sera bon pour moi @Yaty. Bon pour toi @forresst ?


Single-file Vue components (SFCs) require pre-compilation before they can be run in Node or in the browser. There are two recommended ways to perform the compilation: with a Jest preprocessor, or directly use webpack.
Les composants Vue monofichiers nécessitent une étape de pré-compilation avant qu'ils soient lancés dans Node ou sur un navigateur. Il existe deux méthodes recommandées pour réaliser la compilation : avec un préprocesseur Jest ou directement en utilisant webpack.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

précompilation

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Node.js

@MachinisteWeb
Copy link
Member

@forresst, nous n'attendons plus que t'as bénédiction :)

@MachinisteWeb
Copy link
Member

Tu regarderas @Yaty, il y a le nouveau fichier dom-event.md à traduire pour finaliser le guide ! C'est dans le working

@mdartic
Copy link
Member

mdartic commented Nov 2, 2017

ah désolé, je me suis permis de traduire le dom-event.md ... bon vous m'en voudrez pas hein :-)

@MachinisteWeb
Copy link
Member

On attend toujours ta validation @forresst pour finir la partie Guide :)

@forresst
Copy link

forresst commented Nov 4, 2017

Oups ! Désolé

@MachinisteWeb MachinisteWeb merged commit 1a2f61f into vuejs-fr:working Nov 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants