Injected Methods
At runtime, TestBox will also decorate your bundle CFC with tons of methods to help you in your testing adventures. Depending on your testing style you will leverage some more than others. For the latest methods please visit the API Docs for more information.
1
// quick assertion methods
2
assert( expression, [message] )
3
fail(message)
4
5
// bdd methods
6
beforeEach( body )
7
afterEach( body )
8
describe( title, body, labels, asyncAll, skip )
9
xdescribe( title, body, labels, asyncAll )
10
it( title, body, labels, skip )
11
xit( title, body, labels )
12
expect( actual )
13
14
// extensions
15
addMatchers( matchers )
16
addAssertions( assertions )
17
18
// runners
19
runRemote( testSpecs, testSuites, deubg, reporter );
20
21
// utility methods
22
console( var, top )
23
debug( var, deepCopy, label, top )
24
clearDebugBuffer()
25
getDebugBuffer()
26
print( message )
27
printLn( message )
28
29
// mocking methods
30
makePublic( target, method, newName )
31
querySim( queryData )
32
getmockBox( generationPath )
33
createEmptyMock( className, object, callLogging )
34
createMock( className, object, clearMethods, callLogging )
35
prepareMock( object, callLogging )
36
createStub( callLogging, extends, implements )
37
getProperty( target, name, scope, defaultValue )
Copied!
Copy link
Edit on GitHub