> ## 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.

> The **Actions NPM (`@auth0/actions`)** package enables the use of TypeScript development on external projects, allowing developers to follow best practices and improve their **Unit Testing** based on the TypeScript definitions.

# Actions Unit Test

# Auth0 Actions Unit Test

The **Actions NPM (`@auth0/actions`)** package enables the use of TypeScript development on external projects, allowing developers to follow best practices and improve their unit testing based on the TypeScript definitions.

## How it works

Follow the installation and import guidelines described at: [How Actions NPM works](/docs/customize/actions/actions-npm#how-it-works).

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.

The Unit Tests can be run in a local environment, version control, or CI/CD process, improving the overall quality assurance and validations before impacting changes on Auth0 Tenants.

## Examples

The following pages provide validation for a series of scenarios by mocking the necessary objects, with full JavaScript and TypeScript suites for Jest, Mocha, and the Node.js test runner.

* [Test an Action](/docs/customize/actions/unit-test/test-an-action)
* [Test an Action That Uses a Module](/docs/customize/actions/unit-test/test-an-action-module)
* [Mock Dependencies](/docs/customize/actions/unit-test/mock-dependencies)
* [Mock Form Render](/docs/customize/actions/unit-test/mock-form-render)
* [Mock Redirects](/docs/customize/actions/unit-test/mock-redirects)

To learn more about `@auth0/actions`, visit: [https://www.npmjs.com/package/@auth0/actions](https://www.npmjs.com/package/@auth0/actions).

To learn more about writing Actions, read [Write Your First Action](/docs/customize/actions/write-your-first-action).
