Skip to content

Added new examples to README - #230

Open
elopez00 wants to merge 1 commit into
NagRock:masterfrom
elopez00:updated-documentation
Open

Added new examples to README#230
elopez00 wants to merge 1 commit into
NagRock:masterfrom
elopez00:updated-documentation

Conversation

@elopez00

Copy link
Copy Markdown

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.

1 participant