From 0a12aa746ece9a645b5a610e5eeae6a5c39522c6 Mon Sep 17 00:00:00 2001 From: Nando Vieira Date: Mon, 2 Dec 2024 17:35:39 -0800 Subject: [PATCH] stellar-cli v22.0.1 --- docs/build/guides/testing/unit-tests.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/build/guides/testing/unit-tests.mdx b/docs/build/guides/testing/unit-tests.mdx index dc70ccfed..87b7e902d 100644 --- a/docs/build/guides/testing/unit-tests.mdx +++ b/docs/build/guides/testing/unit-tests.mdx @@ -25,6 +25,7 @@ fn test() { assert_eq!(client.increment(), 3); } ``` + Ref: https://github.com/stellar/soroban-examples/blob/main/increment/src/test.rs :::tip @@ -42,6 +43,7 @@ The Env created at the beginning of the test is not a simulation of the Soroban It's a simple test, but it's a complete test. There's a full environment setup, used, and torn down in the test, and it happens fast. The Rust test harness runs all the tests for a contract in parallel and each will have its own isolated contract environment. Most tests, even integration tests and fuzz tests, will look very similar to this unit test. They'll do four things: + 1. Create an environment, the `Env`. 2. Register the contract(s) to be tested. 3. Invoke functions using a client.