feat: add clarunit with basic usage example

This commit is contained in:
MarvinJanssen
2023-12-27 15:50:34 +01:00
parent 577b118a36
commit e7c6592b6b
5 changed files with 1780 additions and 33 deletions

View File

@@ -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"

File diff suppressed because it is too large Load Diff

View File

@@ -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"
}
}
}

View 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)
)
)

View File

@@ -0,0 +1,2 @@
import { clarunit } from "clarunit";
clarunit(simnet);