
JavaScript Testing Practices and Principles Writing a Basic Unit Test Exercise
Learning Paths:
Topics:
Transcript from the "Writing a Basic Unit Test Exercise" Lesson
[00:00:00]
>> Kent C. Dodds: All right, so I'm gonna set you off on this. So again, this is taking a user object, and I've got an example of a user object. You can just un-comment that and take that if you want to. But this is the user object and by the end of your test it should only have the first two properties here, the ID and username.
[00:00:23] The rest of these are considered safe properties and they should be omitted. So you’ll call the user object with this user, it’ll give you back a new user. And you’ll verify that that new user doesn’t have the properties it's not supposed to have.