Skip to content

Commit 3f2b5d0

Browse files
committed
Add notice about deepStrictEqual method
1 parent 8348ab5 commit 3f2b5d0

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/content/4/en/part4a.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ The value returned by the function could be in the following format:
736736
}
737737
```
738738
739-
**NB** when you are comparing objects, the [deepStrictEqual](https://nodejs.org/api/assert.html#assertdeepstrictequalactual-expected-message) method is probably what you want to use, since the [strictEqual](https://nodejs.org/api/assert.html#assertstrictequalactual-expected-message) tries to verify that the two values are the same value, and not just that they contain the same properties. For differences between various assert module functions, you can refer to [this Stack Overflow answer](https://stackoverflow.com/a/73937068/15291501).
739+
**NB** when you are comparing objects, the [deepStrictEqual](https://nodejs.org/api/assert.html#assertdeepstrictequalactual-expected-message) method is probably what you want to use, as it ensures that the objects have the same attributes. For differences between various assert module functions, you can refer to [this Stack Overflow answer](https://stackoverflow.com/a/73937068/15291501).
740740
741741
Write the tests for this exercise inside of a new <i>describe</i> block. Do the same for the remaining exercises as well.
742742

src/content/4/fi/osa4a.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -724,6 +724,8 @@ Paluuarvo voi olla esim. seuraavassa muodossa:
724724
}
725725
```
726726
727+
**HUOM.** Kun vertailet olioita, haluat luultavimmin käyttää [deepStrictEqual](https://nodejs.org/api/assert.html#assertdeepstrictequalactual-expected-message)-metodia, sillä se tarkistaa, että olioilla on samat attribuutit. Assert-moduulin eri metodeista voit lukea lisää esimerkiksi [tästä Stack Overflow -vastauksesta](https://stackoverflow.com/a/73937068/15291501).
728+
727729
Tee myös tämän ja seuraavien kohtien testit kukin oman <i>describe</i>-lohkonsa sisälle.
728730
729731
#### 4.6*: apufunktioita ja yksikkötestejä, step4

0 commit comments

Comments
 (0)