Skip to content

Commit

Permalink
chore: Enabled unit-testing feature in all the examples in dev-depe…
Browse files Browse the repository at this point in the history
…ndencies as it should be since 5.0 release (#1230)
  • Loading branch information
lordshashank authored Aug 1, 2024
1 parent 9dc8aa0 commit 1fda82d
Show file tree
Hide file tree
Showing 15 changed files with 33 additions and 3 deletions.
1 change: 1 addition & 0 deletions examples/adder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ tokio = { version = "1.14", features = ["full"] }
anyhow = "1.0"
near-abi = "0.4.0"
zstd = "0.13"
near-sdk = { path = "../../near-sdk", features = ["unit-testing"] }

[profile.release]
codegen-units = 1
Expand Down
1 change: 1 addition & 0 deletions examples/callback-results/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ near-sdk = { path = "../../near-sdk" }
near-workspaces = "0.11.0"
tokio = { version = "1.14", features = ["full"] }
anyhow = "1.0"
near-sdk = { path = "../../near-sdk", features = ["unit-testing"] }

[profile.release]
codegen-units = 1
Expand Down
2 changes: 1 addition & 1 deletion examples/cross-contract-calls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"

[dev-dependencies]
anyhow = "1.0"
near-sdk = { path = "../../near-sdk" }
near-sdk = { path = "../../near-sdk", features = ["default", "unit-testing"] }
test-case = "2.0"
tokio = { version = "1.14", features = ["full"] }
near-workspaces = "0.11.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/cross-contract-calls/high-level/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ edition = "2021"
crate-type = ["cdylib"]

[dependencies]
near-sdk = { path = "../../../near-sdk" }
near-sdk = { path = "../../../near-sdk" , features = ["default", "unit-testing"] }
2 changes: 1 addition & 1 deletion examples/cross-contract-calls/low-level/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ edition = "2021"
crate-type = ["cdylib"]

[dependencies]
near-sdk = { path = "../../../near-sdk" }
near-sdk = { path = "../../../near-sdk" , features = ["default", "unit-testing"] }
1 change: 1 addition & 0 deletions examples/factory-contract/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ anyhow = "1.0"
test-case = "2.0"
tokio = { version = "1.14", features = ["full"] }
near-workspaces = "0.11.0"
near-sdk = { path = "../../near-sdk", features = ["unit-testing"] }

[profile.release]
codegen-units = 1
Expand Down
3 changes: 3 additions & 0 deletions examples/factory-contract/high-level/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ crate-type = ["cdylib"]

[dependencies]
near-sdk = { path = "../../../near-sdk" }

[dev-dependencies]
near-sdk = { path = "../../../near-sdk", features = ["unit-testing"] }
3 changes: 3 additions & 0 deletions examples/factory-contract/low-level/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ crate-type = ["cdylib"]

[dependencies]
near-sdk = { path = "../../../near-sdk" }

[dev-dependencies]
near-sdk = { path = "../../../near-sdk", features = ["unit-testing"] }
3 changes: 3 additions & 0 deletions examples/fungible-token/ft/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ crate-type = ["cdylib"]
[dependencies]
near-sdk = { path = "../../../near-sdk" }
near-contract-standards = { path = "../../../near-contract-standards" }

[dev-dependencies]
near-sdk = { path = "../../../near-sdk", features = ["unit-testing"] }
3 changes: 3 additions & 0 deletions examples/fungible-token/test-contract-defi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ crate-type = ["cdylib"]
[dependencies]
near-sdk = { path = "../../../near-sdk" }
near-contract-standards = { path = "../../../near-contract-standards" }

[dev-dependencies]
near-sdk = { path = "../../../near-sdk", features = ["unit-testing"] }
3 changes: 3 additions & 0 deletions examples/non-fungible-token/nft/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ crate-type = ["cdylib"]
[dependencies]
near-sdk = { path = "../../../near-sdk" }
near-contract-standards = { path = "../../../near-contract-standards" }

[dev-dependencies]
near-sdk = { path = "../../../near-sdk", features = ["unit-testing"] }
3 changes: 3 additions & 0 deletions examples/non-fungible-token/test-approval-receiver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ crate-type = ["cdylib"]
[dependencies]
near-sdk = { path = "../../../near-sdk" }
near-contract-standards = { path = "../../../near-contract-standards" }

[dev-dependencies]
near-sdk = { path = "../../../near-sdk", features = ["unit-testing"] }
3 changes: 3 additions & 0 deletions examples/non-fungible-token/test-token-receiver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ crate-type = ["cdylib"]
[dependencies]
near-sdk = { path = "../../../near-sdk" }
near-contract-standards = { path = "../../../near-contract-standards" }

[dev-dependencies]
near-sdk = { path = "../../../near-sdk", features = ["unit-testing"] }
3 changes: 3 additions & 0 deletions examples/test-contract/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ opt-level = "z"
lto = true
debug = false
panic = "abort"

[dev-dependencies]
near-sdk = { path = "../../near-sdk", features = ["unit-testing"] }
3 changes: 3 additions & 0 deletions examples/versioned/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ opt-level = "z"
lto = true
debug = false
panic = "abort"

[dev-dependencies]
near-sdk = { path = "../../near-sdk", features = ["unit-testing"] }

0 comments on commit 1fda82d

Please sign in to comment.