Run Listeners
Every run and runRaw methods now accept a callbacks argument, which can be a CFC with the right listener methods or a struct with the right closure methods. This will allow you to listen to the testing progress and get information about it. This way you can build informative reports or progress bars.
The available callbacks are:
1
// Called at the beginning of a test bundle cycle
2
function onBundleStart( target, testResults )
3
// Called at the end of the bundle testing cycle
4
function onBundleEnd( target, testResults )
5
6
// Called anytime a new suite is about to be tested
7
function onSuiteStart( target, testResults, suite )
8
// Called after any suite has finalized testing
9
function onSuiteEnd( target, testResults, suite )
10
11
// Called anytime a new spec is about to be tested
12
function onSpecStart( target, testResults, suite, spec )
13
// Called after any spec has finalized testing
14
function onSpecEnd( target, testResults, suite, spec )
Copied!
Copy link
Edit on GitHub