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: 1-js/03-code-quality/05-testing-mocha/3-pow-test-wrong/solution.md
+11-10
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,15 @@
1
-
The test demonstrates one of the temptations a developer meets when writing tests.
1
+
該測試演示了開發者在寫測試時遇到的某種嘗試。
2
2
3
-
What we have here is actually 3 tests, but layed out as a single function with 3 asserts.
3
+
這邊我們實際上有三個測試,但卻只用單一個函式來寫三句斷言。
4
4
5
-
Sometimes it's easier to write this way, but if an error occurs, it's much less obvious what went wrong.
5
+
有時候這種方式更容易寫,但若問題產生時,想知道是什麼出問題也就更不明顯了。
6
6
7
-
If an error happens in the middle of a complex execution flow, then we'll have to figure out the data at that point. We'll actually have to *debug the test*.
0 commit comments