Skip to content

Commit 7368d03

Browse files
authored
Merge pull request #3459 from karprabha/patch-1
Add object comparision method 'deepStrictEqual' in node test module o…
2 parents f6543fb + 9c7fa4a commit 7368d03

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/content/4/en/part4a.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,8 @@ The value returned by the function could be in the following format:
748748
}
749749
```
750750
751+
**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).
752+
751753
Write the tests for this exercise inside of a new <i>describe</i> block. Do the same for the remaining exercises as well.
752754
753755
#### 4.6*: Helper Functions and Unit Tests, step 4

0 commit comments

Comments
 (0)