unifystockx / code_compete

Coding Competition with TDD and TypeScript
MIT License
0 stars 2 forks source link

BUG - Test case is failing from the merged PR #20 #28

Closed krajasekhar-unify closed 3 years ago

krajasekhar-unify commented 3 years ago

Describe the bug There was a fix done in the PR #20 to check whether the function is throwing the error. This is the related comment.

If I am right, this only checks the error thrown has the right error message or not but not whether error is thrown. If the function don't throw any error this test case still passes. We have a reference which do the similar thing at PR#10 : Line 32

However fix is not done the right way and test case didn't stop the error from propagating.

To Reproduce Steps to reproduce the behavior:

  1. Run the tests from the console.

Expected behavior All the test cases to pass.

Screenshots image

Additional context

_Originally posted by @krajasekhar-unify in https://github.com/unifystockx/code_compete/pull/20#discussion_r488494137_