You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sections/errorhandling/testingerrorflows.french.md
+14-14
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,20 @@
1
-
# Test error flows using your favorite test framework
1
+
# Testez les flux d'erreurs en utilisant votre framework de test préféré
2
2
3
-
### One Paragraph Explainer
3
+
### Un paragraphe d'explication
4
4
5
-
Testing ‘happy’ paths is no better than testing failures. Good testing code coverage demands to test exceptional paths. Otherwise, there is no trust that exceptions are indeed handled correctly. Every unit testing framework, like[Mocha](https://mochajs.org/)&[Chai](http://chaijs.com/), supports exception testing (code examples below). If you find it tedious to test every inner function and exception you may settle with testing only REST API HTTP errors.
5
+
Tester les chemins « du bonheur » n’est pas mieux que de tester les échecs. Une bonne couverture du code de test exige de tester des chemins inhabituels. Sinon, il n'est pas certain que les exceptions soient effectivement gérées correctement. Chaque framework de tests unitaires, comme[Mocha](https://mochajs.org/)et[Chai](http://chaijs.com/), prend en charge les tests d'exception (exemples de code ci-dessous). Si vous trouvez fastidieux de tester chaque fonction interne et chaque exception, vous pouvez vous contenter de tester uniquement les erreurs HTTP de l'API REST.
6
6
7
-
### Code example: ensuring the right exception is thrown using Mocha & Chai
7
+
### Exemple de code : s'assurer que la bonne exception est levée à l'aide de Mocha & Chai
8
8
9
9
<details>
10
10
<summary><strong>Javascript</strong></summary>
11
11
12
12
```javascript
13
13
describe('Facebook chat', () => {
14
-
it('Notifies on new chat message', () => {
14
+
it('Avertit en cas de nouveau message dans la discussion', () => {
0 commit comments