Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(std/testing): fix NewUserRealm reference usage #3178

Merged

Conversation

MikaelVallenet
Copy link
Member

@MikaelVallenet MikaelVallenet commented Nov 21, 2024

FIX: https://docs.gno.land/reference/stdlibs/std/testing/#testsetrealm

FROM

Usage

addr := std.Address("g1ecely4gjy0yl6s9kt409ll330q9hk2lj9ls3ec")
std.TestSetRealm(std.NewUserRealm(""))
// or 
std.TestSetRealm(std.NewCodeRealm("gno.land/r/demo/users"))

TO

Usage

addr := std.Address("g1ecely4gjy0yl6s9kt409ll330q9hk2lj9ls3ec")
std.TestSetRealm(std.NewUserRealm(addr))
// or 
std.TestSetRealm(std.NewCodeRealm("gno.land/r/demo/users"))
Contributors' checklist...
  • Added new tests, or not needed, or not feasible
  • Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • Updated the official documentation or not needed
  • No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • Added references to related issues and PRs
  • Provided any useful hints for running manual tests

Copy link

codecov bot commented Nov 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

Copy link
Contributor

@leohhhn leohhhn left a comment

Choose a reason for hiding this comment

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

good catch!

@leohhhn leohhhn merged commit 4d80378 into gnolang:master Nov 22, 2024
104 checks passed
r3v4s pushed a commit to gnoswap-labs/gno that referenced this pull request Dec 10, 2024
FIX: https://docs.gno.land/reference/stdlibs/std/testing/#testsetrealm

FROM

#### Usage
```go
addr := std.Address("g1ecely4gjy0yl6s9kt409ll330q9hk2lj9ls3ec")
std.TestSetRealm(std.NewUserRealm(""))
// or 
std.TestSetRealm(std.NewCodeRealm("gno.land/r/demo/users"))
```

TO

#### Usage
```go
addr := std.Address("g1ecely4gjy0yl6s9kt409ll330q9hk2lj9ls3ec")
std.TestSetRealm(std.NewUserRealm(addr))
// or 
std.TestSetRealm(std.NewCodeRealm("gno.land/r/demo/users"))
```

<details><summary>Contributors' checklist...</summary>

- [x] Added new tests, or not needed, or not feasible
- [x] Provided an example (e.g. screenshot) to aid review or the PR is
self-explanatory
- [x] Updated the official documentation or not needed
- [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message
was included in the description
- [x] Added references to related issues and PRs
- [x] Provided any useful hints for running manual tests
</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants