mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-05-31 00:01:56 +08:00
feat: add clarunit with basic usage example
This commit is contained in:
@@ -27,3 +27,6 @@ path = "../../stackslib/src/chainstate/stacks/boot/signers-voting.clar"
|
||||
depends_on = []
|
||||
clarity = 2
|
||||
epoch = 2.4
|
||||
|
||||
[contracts.bns_test]
|
||||
path = "./tests/bns_test.clar"
|
||||
|
||||
1796
contrib/core-contract-tests/package-lock.json
generated
1796
contrib/core-contract-tests/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -12,9 +12,10 @@
|
||||
"@hirosystems/clarinet-sdk": "^1.1.0",
|
||||
"@stacks/transactions": "^6.9.0",
|
||||
"chokidar-cli": "^3.0.0",
|
||||
"clarunit": "github:MarvinJanssen/clarunit#a5c042a",
|
||||
"typescript": "^5.2.2",
|
||||
"vite": "^4.4.9",
|
||||
"vitest": "^0.34.4",
|
||||
"vitest-environment-clarinet": "^1.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
9
contrib/core-contract-tests/tests/bns_test.clar
Normal file
9
contrib/core-contract-tests/tests/bns_test.clar
Normal file
@@ -0,0 +1,9 @@
|
||||
(define-public (test-can-receive-name-none)
|
||||
(begin
|
||||
(asserts!
|
||||
(is-eq (ok true) (contract-call? .bns can-receive-name tx-sender))
|
||||
(err "Should be able to receive a name")
|
||||
)
|
||||
(ok true)
|
||||
)
|
||||
)
|
||||
2
contrib/core-contract-tests/tests/clarunit.test.ts
Normal file
2
contrib/core-contract-tests/tests/clarunit.test.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
import { clarunit } from "clarunit";
|
||||
clarunit(simnet);
|
||||
Reference in New Issue
Block a user