Skip to content

Commit

Permalink
add link to Docker Hub for testing zkApps
Browse files Browse the repository at this point in the history
  • Loading branch information
barriebyron authored Jul 19, 2023
1 parent 7dbe2c0 commit 9cbd70a
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion docs/zkapps/how-to-test-a-zkapp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ keywords:
- Smart contract
- Jest
- Local blockchain
- Docker test
---

:::info
Expand All @@ -18,10 +19,24 @@ zkApp programmability is not yet available on the Mina Mainnet. You can get star

# How to Test a zkApp

Writing automated tests for your smart contract is essential to ensure your code is well tested during development. All projects created using the Mina zkApp CLI include the [Jest](https://jestjs.io/) JavaScript testing framework. Although you can use any testing framework, the instructions in this document are supported for Jest.
Writing automated tests for your smart contract is essential to ensure your code is well-tested during development.

## Test zkApps on a lightweight Mina local network

A Docker image for Mina local networks provides a simple and efficient way to deploy and run lightweight Mina blockchain networks for testing zkApps. The `o1labs/mina-local-network` Docker image provides:

- Genesis ledger with pre-funded accounts
- Accounts manager service
- Additional port served by reverse proxy to pass requests to the Mina daemon GraphQL endpoint so zkApps work without additional configuration
- Single commands to launch a single node or multi node network

Pull the [o1labs/mina-local-network]
(https://hub.docker.com/r/o1labs/mina-local-network) image from Docker Hub.

## Writing tests for your smart contract

All projects created using the Mina zkApp CLI include the [Jest](https://jestjs.io/) JavaScript testing framework. Although you can use any testing framework, the instructions in this document are supported for Jest.

Use the Mina zkApp CLI to create tests for your smart contract.

To scaffold a TypeScript file with a corresponding test file, run:
Expand Down

0 comments on commit 9cbd70a

Please sign in to comment.