The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning. Learn more β
Top 13 TypeScript Mocking Projects
-
mockoon
Mockoon is the easiest and quickest way to run mock APIs locally. No remote deployment, no account required, open source.
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
prism
Turn any OpenAPI2/3 and Postman Collection file into an API server with mocking, transformations and validations. (by stoplightio)
-
ng-mocks
Angular testing library for mocking components, directives, pipes, services and facilitating TestBed setup
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
camouflage
Camouflage is a backend mocking tool for HTTP, gRPC, Websockets and Thrift protocols, which helps you carry out your front end prototyping, unit testing, functional/performance testing in silos, in absence of one or more Microservices/APIs.
However, I discovered a great combination that transformed my API call testing in TypeScript: Vitest and Mock Service Worker (MSW). Their well-crafted design makes them incredibly easy to use, enhancing the overall testing experience.
Mockoon - Used as a logging server instead of using print in the console.
Since the OpenAPI can effectively describe our resources, we can reuse it to generate a dummy server that can be later used for development and testing purposes without bootstrapping any actual services. There some tools available that can help us with this task, such as Prism, OpenAPI Mock, OpenAPI Backend and the MSW library we have already seen.
Project mention: Unit Testing in Node.js and TypeScript: A Comprehensive Guide with Jest Integration | dev.to | 2024-03-03If you are using a mocking library, such as sinon, jest-mock, or ts-mockito, make sure that it is compatible with Jest. You may need to install additional packages or configure them in your configuration file. For example, to use sinon with Jest, you can install the sinon-jest package and add the following to your configuration file:
Project mention: What direction can I take to mocking a data structure that is relational on the front-end while I wait for backend endpoints to be created? | /r/Frontend | 2023-12-09
Project mention: Unit Test Like a Pro: Automock, My Open Source Answer to Mocking Frustration π€π‘π | dev.to | 2023-12-12π Here are some links to check out: π GitHub: https://github.com/automock/automock π Automock's NestJS Official Recipe: https://docs.nestjs.com/recipes/automock π¦ NPM: https://www.npmjs.com/package/@automock/jest π Docs Website: https://automock.dev
That's it - partial mock helps with the "over-mocking", situations where you mock too much, and it also solves problems with the "under-mocking" where you missing some important pieces.
TypeScript Mocking related posts
- Unit Test Like a Pro: Automock, My Open Source Answer to Mocking Frustration π€π‘π
- Show HN: Automock β Open-Source Project for Simpler Unit Testing in TypeScript
- The most effective Schema-Driven Development using OpenAPI for Logistic Engineer
- What direction can I take to mocking a data structure that is relational on the front-end while I wait for backend endpoints to be created?
- What direction can I take to mock a (relational?) data-structure on the front-end while I wait for backend endpoints to be created?
- Automock - Open Source Project for Easier Unit Testing in TypeScript
- Automock - Open Source Project for Easier Unit Testing in Typescript
-
A note from our sponsor - WorkOS
workos.com | 25 Apr 2024
Index
What are some of the best open-source Mocking projects in TypeScript? This list will help you:
Project | Stars | |
---|---|---|
1 | msw | 14,808 |
2 | mockoon | 5,864 |
3 | prism | 4,006 |
4 | ng-mocks | 995 |
5 | ts-mockito | 946 |
6 | data | 746 |
7 | automock | 275 |
8 | camouflage | 253 |
9 | laika | 121 |
10 | strong-mock | 92 |
11 | such | 29 |
12 | mockoon.com | 18 |
13 | partial-mock | 12 |
Sponsored