https://www.youtube.com/watch?v=vXDbmrh0xDQSo in this video he basically takes over a method (get) in a library (request) and replaces the callback with a custom body object. When the body has an object { id: 1}, he asserts that the results are { id: 1 }.Another test was to check that an empty object would return an empty object.How is this not just testing that true == true, and 1 === 1? This makes no sense to me. He's going to get back exactly what he wants every time because it's setup that way.In the video he actually requests the URL with a parameter of 'zzz', which returns {}. So shouldn't the test be that 'zzz' expects {} to be the result?
Submitted October 16, 2019 at 08:00PM by JavascriptDeveloper
No comments:
Post a Comment