Skip to content

Fantom-Factory/afAxontExt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Axont v0.1.0


An extension for SkySpark v3.1.1+ that provides a unit test runner and assertion functions for testing Axon code.

AxonT source code is available on Fantom Factory's GitHub - AxonT.

Quick Start

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 result
  verifyEq(expected, actual)

  "okay"
end

testFailExample : () => do
  expected : "foo bar"
  actual   : "poo"

  // assert the result
  verifyEq(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 Result Grid

Licensing

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!