An extension for SkySpark v3.0.12+ that provides a unit test runner and assertion functions for testing Axon code.
First create some test functions in Axon. Test functions are typically prefixed with
test, take no arguments, and optionally return
okay to signify just that.
testPassExample : () => do expected : "foo bar" actual : "foo bar"
// this bit should do some work! // assert the resultverifyEq(expected, actual) "okay" end testFailExample : () => do expected : "foo bar" actual : "poo" // assert the resultverifyEq(expected, actual) "okay" end
Then pass them to the test runner to have them executed.
// run tests[ testPassExample, testFailExample ].runTests()
Results are returned in a handy grid:
AxonT Ext is free software and an open source project licensed under the permissive ISC Licence by the Internet Systems Consortium - it is similar to the popular MIT licence, only shorter!
verifyNotEq()are more lenient when testing Lists and Dicts. (e.g. the backing Fantom List type is ignored,
Etc.dictEq()is now used but also patched for this bug.)
runTests()results. (Thanks go to John MacEnri / Crawley Carbon for the pull requst.)
afAxontfor consistency with other Alien-Factory products.
verifyErrreturns the err msg should you wish to perform further (regex) tests on it.
|Build date||1 year ago|
on 4th Jul 2020
Published byFantom FactoryDownload now
Also available via SkyArc Install Manager