Use Expect for clear expectations
Open
enhancement
- Dominant language
- V
- Stars
- 1
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Instead of this in tests
```v
module test
import ip { Ipv4 }
fn test_it_parses_ipv4_address() {
assert Ipv4.parse("192.168.1.1") or { Ipv4{} } == Ipv4{address: [u8(192), 168, 1, 1]!}
}
```
Use this
```v
module test
import khalyomede.expect { expect }
import ip { Ipv4 }
fn test_it_parses_ipv4_address() {
expect(Ipv4.parse("192.168.1.1") or { Ipv4{} }).to_be_equal_to(Ipv4{address: [u8(192), 168, 1, 1]!})
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.