Skip to content

Commit 0d4f534

Browse files
Replace uses of cargo test with cargo contract test in ink! v6 docs (#410)
1 parent 6c907b2 commit 0d4f534

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

versioned_docs/version-v6/background/ink-vs-cosmwasm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ $ cargo contract build
135135
and tested via:
136136

137137
```
138-
$ cargo test
138+
$ cargo contract test
139139
```
140140

141141
### Deploy and Interact

versioned_docs/version-v6/background/ink-vs-solidity.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ mycontract = { path = "mycontract/", default-features = false, features = ["ink-
878878
## unit testing (off-chain)
879879

880880
- Unit tests are an integral part of smart-contract development and ensuring your code works off-chain before testing on-chain.
881-
- To run ink! tests, use the command `cargo test`. Add the `--nocapture` flag for debug prints to show.
881+
- To run ink! tests, use the command `cargo contract test`. Add the `--nocapture` flag for debug prints to show.
882882
- From the contract module, make sure to make the contract struct and anything else that is going to be used in the unit tests public. For example:
883883

884884
```rust

versioned_docs/version-v6/basics/contract-template.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ In the `lib.rs` file you find initial scaffolded code, which you can use as a st
2929
Quickly check that it compiles, and the trivial tests pass with:
3030

3131
```bash
32-
$ cargo test
32+
$ cargo contract test
3333
```
3434

3535
Also check that you can build the contract by running:
@@ -38,8 +38,8 @@ Also check that you can build the contract by running:
3838
$ cargo contract build
3939
```
4040

41-
`cargo test` builds the contract for `std`, `cargo contract build` for an
42-
on-chain deployment (`no_std` with a RISC-V target).
41+
`cargo contract test` builds the contract for `std`,
42+
`cargo contract build` for an on-chain deployment (`no_std` with a RISC-V target).
4343

4444
If everything looks good, then we are ready to start programming!
4545

@@ -84,7 +84,7 @@ std = [
8484
ink-as-dependency = []
8585

8686
# This feature is just a convention, so that the end-to-end tests
87-
# are only executed if `cargo test` is explicitly invoked with
87+
# are only executed if `cargo contract test` is explicitly invoked with
8888
# `--features e2e-tests`.
8989
e2e-tests = []
9090
```

versioned_docs/version-v6/getting-started/creating.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ At the bottom of the `lib.rs` you'll see some simple test cases which verify the
5252
We can quickly test this code is functioning as expected:
5353

5454
```bash
55-
$ cargo test
55+
$ cargo contract test
5656
```
5757

5858
To which you should see a successful test completion:
5959

6060
```bash
61-
$ cargo test
61+
$ cargo contract test
6262
running 2 tests
6363
test flipper::tests::it_works ... ok
6464
test flipper::tests::default_works ... ok

versioned_docs/version-v6/testing/e2e.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,5 @@ $ export CONTRACTS_NODE="YOUR_CONTRACTS_NODE_PATH"
8181
And finally execute the following command to start e2e test execution.
8282

8383
```bash
84-
$ cargo test --features e2e-tests
84+
$ cargo contract test --features e2e-tests
8585
```

versioned_docs/version-v6/testing/testing-with-live-state.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ export CONTRACT_HEX=0x2c75f0aa09dbfbfd49e6286a0f2edd3b4913f04a58b13391c79e96782f
208208
# process (typically of `ink-node`) for each test.
209209
export CONTRACTS_NODE_URL=ws://127.0.0.1:8000
210210
211-
cargo test --features e2e-tests e2e_test_deployed_contract -- --ignored
211+
cargo contract test --features e2e-tests e2e_test_deployed_contract -- --ignored
212212
```
213213

214214
You will get output similar to the following:

versioned_docs/version-v6/testing/unit-integration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ On this page we lay out the different use-cases for unit vs. integration tests.
1212

1313
## Unit Tests
1414

15-
Testing contracts off-chain is done by `cargo test` and users can simply use the standard Rust
15+
Testing contracts off-chain is done by `cargo contract test` and users can simply use the standard Rust
1616
routines of creating unit test modules within the ink! project:
1717

1818
```rust

0 commit comments

Comments
 (0)