> ## Documentation Index
> Fetch the complete documentation index at: https://auth0-actions-modules-ga.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> Unit test Auth0 Actions by mocking the event and api objects with the @auth0/actions NPM package, using Jest, Mocha, or the Node.js Test Runner in JavaScript or TypeScript.

# Actions Unit Test

Using the [`@auth0/actions`](https://www.npmjs.com/package/@auth0/actions) NPM package, you can write unit tests for your Actions and run them locally, in version control, or in a CI/CD process, catching issues before they reach your Auth0 tenant.

## How it works

Follow the installation and import guidelines described at: [How Actions NPM works](/docs/customize/actions/npm/write-your-action-using-your-code-editor).

To unit test an Action, you must mock the `event` and `api` objects that your Action function receives. You can create these mocks using the TypeScript definitions included in `auth0/actions`, which ensures your tests accurately reflect the production environment. Testing frameworks like Jest are ideal for managing mocking and functionality.

## Examples
