Skip to content

Commit

Permalink
Merge pull request #527 from o1-labs/barriebyron-patch-1
Browse files Browse the repository at this point in the history
509 add link to Docker Hub for testing zkApps
  • Loading branch information
barriebyron authored Jul 19, 2023
2 parents fc78edb + 828d5a7 commit a5ce337
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 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,23 @@ 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

1 comment on commit a5ce337

@vercel
Copy link

@vercel vercel bot commented on a5ce337 Jul 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

docs2 – ./

docs.minaprotocol.com
docs2-git-main-minadocs.vercel.app
docs2-minadocs.vercel.app

Please sign in to comment.