Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new examples to README #230

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

elopez00
Copy link

Summary

As a user of this library, I thought these additions to the documentation would be useful for any first-time user to know when using ts-mockito. These are:

  • Being careful with testing getters that return class objects: I found this out later with my team the hard way when we realized that you can't access properties of getters within when. Retrospectively, this makes a ton of sense, but at the time we would keep getting this obscure error that didn't really explain what was going on. I think adding this example would just be a good heads up for anyone that might encounter the same issue down the line.
  • Mocking objects within functions: I think this is one of the most important features for most, and if you are somebody who is looking for this kind of solution for the first time, having a clear statement saying: "You can in fact mock class object functionalities within other functions without much hassle" would make users look no further.

These changes aren't game changing for users who already know what they're looking for, or understand the underlying functinoalities of the library. I made them more for users like me when we stumbled across this library for the first time looking for an easy and elgant solution. ts-mockito is where it's at, and I think these clarifications could be helpful in the long run :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant