Version 0.41.0
github-actions
released this
29 Sep 15:10
·
2869 commits
to refs/heads/master
since this release
⬆️ Install or Upgrade
Follow the Flow CLI installation guide for instructions on how to install or upgrade the CLI.
⭐ Features
Test runner
You can finally feel confident your Cadence code behaves! You are now able to run Cadence tests using the Flow CLI.
Here's an example of a Cadence test:
import Test
pub fun testSimpleScript() {
var blockchain = Test.newEmulatorBlockchain()
var result = blockchain.executeScript(
"pub fun main(a: Int, b: Int): Int { return a + b }",
[2, 3]
)
assert(result.status == Test.ResultStatus.succeeded)
assert((result.returnValue! as! Int) == 5)
}
And then you can simply run it with:
> flow test test_script.cdc
Running tests...
Test results:
- PASS: testSimpleScript
🛠 Improvements
- Update CD to go 1.19 (#666) @sideninja