Skip to content

Commit 5973354

Browse files
authored
Add test-utils to required in toml (#129)
1 parent 025a2b8 commit 5973354

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ cargo build --locked --all-targets --all-features
6060
Run the test suite (we recommend nextest):
6161

6262
```bash
63-
cargo nextest run --features test-utils
63+
cargo nextest run
6464
# or
65-
cargo test --features test-utils
65+
cargo test
6666
```
6767

6868
Run examples:
@@ -123,7 +123,7 @@ cargo clippy --all-targets --all-features -- -D warnings -D clippy::pedantic
123123
typos
124124
125125
# Tests (prefer nextest)
126-
cargo nextest run --features test-utils
126+
cargo nextest run
127127
```
128128

129129
---
@@ -160,7 +160,7 @@ Key implementation details, trade-offs, and alternatives considered.
160160
- [ ] `cargo +nightly fmt --all --check`
161161
- [ ] `cargo clippy --all-targets --all-features -- -D warnings -D clippy::pedantic`
162162
- [ ] `typos`
163-
- [ ] Tests pass (`cargo nextest run --features test-utils`)
163+
- [ ] Tests pass (`cargo nextest run`)
164164
- [ ] Docs/README/examples updated (if applicable)
165165
```
166166

Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,8 @@ workspace = true
7171

7272
[features]
7373
test-utils = []
74+
75+
[[test]]
76+
# see tests/mod.rs
77+
name = "mod"
78+
required-features = ["test-utils"]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,6 @@ Both examples spin up a local `anvil` instance, deploy a demo counter contract,
224224
Integration tests cover all modes:
225225

226226
```bash
227-
cargo nextest run --features test-utils
227+
cargo nextest run
228228
```
229229

tests/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// This test module triggers the `test-utils` feature when running
2+
// `cargo test`. Without it, you'd need to manually specify `--features test-utils`
3+
// every time.
14
mod common;
25
mod historic_mode;
36
mod historic_to_live;

0 commit comments

Comments
 (0)