From f23ee2d52348984097df6f1c3f89910c30b8216d Mon Sep 17 00:00:00 2001 From: leohhhn Date: Fri, 12 Jan 2024 17:20:05 +0100 Subject: [PATCH 1/3] remove leftover paragraph --- docs/concepts/gno-test.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/docs/concepts/gno-test.md b/docs/concepts/gno-test.md index d264b00c7da..e715787af4c 100644 --- a/docs/concepts/gno-test.md +++ b/docs/concepts/gno-test.md @@ -82,12 +82,6 @@ Replacing the second test case with the following will successfully fix the issu } ``` -## Blockchain context in tests -Running `gno test` executes files within the directory that end with `_test.gno` and `_filetest.gno`. -Internally, a GnoVM instance is initialized to run the test, and, at that moment, -a blockchain-related context is injected into the GnoVM. Utilizing this context, the transaction sender, -coins, block height, etc. can be mocked. - ## Manipulating blockchain context in tests Some functions in the `std` package are exclusively accessible in `_test.gno` and `_filetest.gno` files. These are located in the `std` package, and their primary role From c329b2f7342d4798b5999d09ceb689de107b15c0 Mon Sep 17 00:00:00 2001 From: leohhhn Date: Fri, 12 Jan 2024 17:21:54 +0100 Subject: [PATCH 2/3] fixup --- docs/concepts/gno-test.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/concepts/gno-test.md b/docs/concepts/gno-test.md index e715787af4c..57eff8f39f0 100644 --- a/docs/concepts/gno-test.md +++ b/docs/concepts/gno-test.md @@ -82,9 +82,10 @@ Replacing the second test case with the following will successfully fix the issu } ``` -## Manipulating blockchain context in tests -Some functions in the `std` package are exclusively accessible in `_test.gno` -and `_filetest.gno` files. These are located in the `std` package, and their primary role -is to alter the blockchain context for test runs. +## Blockchain context in tests +Running `gno test` executes files within the directory that end with `_test.gno` and `_filetest.gno`. +Internally, a GnoVM instance is initialized to run the test, and, at that moment, +a blockchain-related context is injected into the GnoVM. Utilizing this context, the transaction sender, +coins, block height, etc. can be mocked. For detailed information on these functions, refer to their [reference page](../reference/standard-library/std/testing.md). From efe1e79d80b0c3b8fe086e50db97a0f713ff5273 Mon Sep 17 00:00:00 2001 From: leohhhn Date: Fri, 12 Jan 2024 17:23:05 +0100 Subject: [PATCH 3/3] typo fix --- docs/reference/standard-library/std/testing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/standard-library/std/testing.md b/docs/reference/standard-library/std/testing.md index eb18c4bb1a0..8c9146c81a1 100644 --- a/docs/reference/standard-library/std/testing.md +++ b/docs/reference/standard-library/std/testing.md @@ -80,7 +80,7 @@ func TestIssueCoins(addr Address, coins Coins) Issues testing context **coins** to **addr**. #### Usage ```go -issue:= std.Coins{{"coin1", 100}, {"coin2", 200}} +issue := std.Coins{{"coin1", 100}, {"coin2", 200}} addr := "g1ecely4gjy0yl6s9kt409ll330q9hk2lj9ls3ec" std.TestIssueCoins(addr, issue) ```