strong-mock
ts-essentials
strong-mock | ts-essentials | |
---|---|---|
4 | 4 | |
92 | 3,556 | |
- | 0.5% | |
7.5 | 4.6 | |
13 days ago | 5 days ago | |
TypeScript | TypeScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
strong-mock
-
libraries you are happy that you discovered them
Shameless plug, but feel free to try https://github.com/NiGhTTraX/strong-mock as an alternative.
- strong-mock: Type safe mocking library for TypeScript
-
"as unknown as Promise<Response>" if you don't want to mock the whole Response object
If checking that getData is called using the correct input, consider using strong-mock.
-
How do you test an Axios call to a GraphQL API in React?
Depending on how you want to check the call, you might want to use a spying library (sinon, jest.fn etc). Check out strong-mock if you're using TypeScript.
ts-essentials
-
Essential Code Organization Principles
Also, it’s not as restrictive as mutability tools — if you know what you are doing and want to ignore this limitation for a particular case, you can apply the -readonly modifier or the Writeable type from type-fest or ts-essentials.
- libraries you are happy that you discovered them
-
ts-essentials VS utility-types - a user suggested alternative
2 projects | 24 Nov 2022
-
Explicit empty list type
True a readonly array would help, or even better yet deep readonly (which comes with ts-essentials) when dealing with non-primitive arrays
What are some alternatives?
ts-mockito - Mocking library for TypeScript
ts-toolbelt - 👷 TypeScript's largest type utility library
mock-inspect - Mocks network requests and allows you to make assertions about how these requests happened. Supports auto-mocking of graphQL requests given a valid schema.
type-fest - A collection of essential TypeScript types
data - Data modeling and relation library for testing JavaScript applications.
Superstruct - A simple and composable way to validate data in JavaScript (and TypeScript).
wonka - 🎩 A tiny but capable push & pull stream library for TypeScript and Flow
DefinitelyTyped - The repository for high quality TypeScript type definitions. [Moved to: https://github.com/DefinitelyTyped/DefinitelyTyped]
ng-mocks - Angular testing library for mocking components, directives, pipes, services and facilitating TestBed setup
talk-typelevel-ts - Code samples for my talk “Type-level programming in TypeScript”
shoehorn - Work seamlessly with partial mocks in TypeScript.
robot - 🤖 A functional, immutable Finite State Machine library