Pricing
Sign In
Start for FreeBook a demo
PricingSign In
Start for Free
Back arrowBack to Templates

Mocking & Unit Test

Create unit tests by mocking Zuplo objects.

Deploy to ZuploView on GitHub
Categories:
Testing

Zuplo Mocking & Unit Test Sample#

This sample shows how to mock ZuploRequest and ZuploContext in order to write unit tests. This sample uses mocha and sinon, but the concepts apply to any test and mocking tool.

See the handlers.spec.ts file for details.

Deploy to Zuplo

Discover More Examples

API Linting

See how to use API linting to enforce api consistency and require Zuplo features like policies.

API Governance

Backend for Frontend (BFF) Auth

Optimize UX and security in web applications with this approach.

Authentication

Custom Rate Limiting

Invoke the Rate Limit policy programatically and then modify the 429 response.

Programmability

Custom Modules

How to bundle custom node modules to use in your Zuplo project.

Programmability
© 2025 zuplo. All right reserved.
Features
API Key ManagementDeveloper PortalMonetizationMulti-cloudOpenAPI NativeProgrammableRate LimitingUnlimited Environments
Developers
DocumentationBlogCommunityChangelogIntegrations
Product
PricingSupportSign InCustomer Stories
Product Comparisons
vs. Apigeevs. AWS API Gatewayvs. Azure API Managementvs. Kongvs. Solo.iovs. Tyk
Company
About UsMedia KitCareersStatusTrust & Compliance
Privacy PolicySecurity PoliciesTerms of ServiceTrust & Compliance