Skip to content

Commit 6976066

Browse files
authored
Merge branch 'master' into sync-52c1e619
2 parents e5f2b48 + 2b6effd commit 6976066

File tree

19 files changed

+408
-421
lines changed

19 files changed

+408
-421
lines changed

1-js/02-first-steps/09-comparison/1-comparison-questions/solution.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ null == "\n0\n" → false
1010
null === +"\n0\n"false
1111
```
1212

13-
Some of the reasons:
13+
Begründungen:
1414

15-
1. Obviously, true.
16-
2. Dictionary comparison, hence false. `"a"` is smaller than `"p"`.
17-
3. Again, dictionary comparison, first char `"2"` is greater than the first char `"1"`.
18-
4. Values `null` and `undefined` equal each other only.
19-
5. Strict equality is strict. Different types from both sides lead to false.
20-
6. Similar to `(4)`, `null` only equals `undefined`.
21-
7. Strict equality of different types.
15+
1. Offensichtlich true.
16+
2. Wörterbuchvergleich, daher false. `"a"` ist kleiner als `"p"`.
17+
3. Wieder, Wörterbuchvergleich, erstes Zeichen `"2"` ist größer als das erste Zeichen `"1"`.
18+
4. Die Werte `null` und `undefined` sind nur gegenseitig gleich.
19+
5. Strikte Gleichheit ist streng. Verschiedene Typen auf beiden Seiten führen zu `false`.
20+
6. Ähnlich wie `(4)`, `null` ist nur gleich `undefined`.
21+
7. Strikte Gleichheit von verschiedenen Datentypen.

1-js/02-first-steps/09-comparison/1-comparison-questions/task.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ importance: 5
22

33
---
44

5-
# Comparisons
5+
# Vergleiche
66

7-
What will be the result for these expressions?
7+
Was wird das Ergebnis dieser Ausdrücke sein?
88

99
```js no-beautify
1010
5 > 4

1-js/02-first-steps/09-comparison/article.md

Lines changed: 88 additions & 95 deletions
Large diffs are not rendered by default.

1-js/03-code-quality/05-testing-mocha/3-pow-test-wrong/solution.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,49 @@
1-
The test demonstrates one of the temptations a developer meets when writing tests.
1+
Der Test zeigt eine der Versuchungen, denen ein Entwickler beim Schreiben von Tests begegnet.
22

3-
What we have here is actually 3 tests, but layed out as a single function with 3 asserts.
3+
Was wir hier tatsächlich haben, sind eigentlich 3 Tests, aber angeordnet als einzelne Funktion mit 3 Assertions.
44

5-
Sometimes it's easier to write this way, but if an error occurs, it's much less obvious what went wrong.
5+
Manchmal ist es einfacher, auf diese Weise zu schreiben, aber wenn ein Fehler auftritt, ist es viel weniger offensichtlich, was schiefgelaufen ist.
66

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*.
7+
Tritt ein Fehler in der Mitte eines komplexen Programmablaufs auf, dann müssen wir die Daten an diesem Punkt herausfinden. Wir müssen tatsächlich *den Test debuggen*.
88

9-
It would be much better to break the test into multiple `it` blocks with clearly written inputs and outputs.
9+
Es wäre viel besser, den Test in mehrere `it` Blöcke aufzubrechen, mit klar geschriebenen Eingaben und Ausgaben.
1010

11-
Like this:
11+
So zum Beispiel:
1212
```js
13-
describe("Raises x to power n", function() {
14-
it("5 in the power of 1 equals 5", function() {
13+
describe("Erhöht x zur Potenz n", function() {
14+
it("5 in der Potenz 1 gleich 5", function() {
1515
assert.equal(pow(5, 1), 5);
1616
});
1717

18-
it("5 in the power of 2 equals 25", function() {
18+
it("5 in der Potenz 2 gleich 25", function() {
1919
assert.equal(pow(5, 2), 25);
2020
});
2121

22-
it("5 in the power of 3 equals 125", function() {
22+
it("5 in der Potenz 3 gleich 125", function() {
2323
assert.equal(pow(5, 3), 125);
2424
});
2525
});
2626
```
2727

28-
We replaced the single `it` with `describe` and a group of `it` blocks. Now if something fails we would see clearly what the data was.
28+
Wir haben das einzelnen `it` durch `describe` und eine Gruppe von `it` Blöcken ersetzt. Wenn jetzt etwas fehlschlägt, würden wir klar sehen, welche Daten es waren.
2929

30-
Also we can isolate a single test and run it in standalone mode by writing `it.only` instead of `it`:
30+
Außerdem können wir einen einzelnen Test isolieren und ihn im Standalone-Modus ausführen, indem wir `it.only` statt `it` schreiben:
3131

3232

3333
```js
34-
describe("Raises x to power n", function() {
35-
it("5 in the power of 1 equals 5", function() {
34+
describe("Erhöht x zur Potenz n", function() {
35+
it("5 in der Potenz 1 gleich 5", function() {
3636
assert.equal(pow(5, 1), 5);
3737
});
3838

3939
*!*
40-
// Mocha will run only this block
41-
it.only("5 in the power of 2 equals 25", function() {
40+
// Mocha wird nur diesen Block ausführen
41+
it.only("5 in der Potenz 2 gleich 25", function() {
4242
assert.equal(pow(5, 2), 25);
4343
});
4444
*/!*
4545

46-
it("5 in the power of 3 equals 125", function() {
46+
it("5 in der Potenz 3 gleich 125", function() {
4747
assert.equal(pow(5, 3), 125);
4848
});
4949
});

1-js/03-code-quality/05-testing-mocha/3-pow-test-wrong/task.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ importance: 5
22

33
---
44

5-
# What's wrong in the test?
5+
# Was ist falsch mit dem Test?
66

7-
What's wrong in the test of `pow` below?
7+
Was ist falsch bei dem Test von `pow` unten?
88

99
```js
10-
it("Raises x to the power n", function() {
10+
it("Erhebt x zur Potenz n", function() {
1111
let x = 5;
1212

1313
let result = x;
@@ -21,4 +21,4 @@ it("Raises x to the power n", function() {
2121
});
2222
```
2323

24-
P.S. Syntactically the test is correct and passes.
24+
P.S. Syntaxmäßig ist der Test korrekt und besteht.

0 commit comments

Comments
 (0)