Faking Requests
// Application.cfc
component {
this.mappings[ "/globber" ] = "/path/to/hyper" & "/modules/globber";
}Faking All Requests
var hyper = new Hyper.models.HyperBuilder();
hyper.fake();hyper.fake();
var res = hyper.get( "https://google.com" );
expect( res.getStatus() ).toBe( "200 OK" );Fake Configuration
FakeHyperResponse
newFakeResponse
newFakeResponseName
Type
Required
Default
Description
Sequencing Fake Responses
Preventing Stray Requests
Making Assertions
HyperBuilder Method Assertions
getFakeRequestCount
Name
Type
Required
Default
Description
wasRequestSent
Name
Type
Required
Default
Description
Custom TestBox Assertions
toHaveSentRequest
toHaveSentCount
toHaveSentNothing
Resetting the Builder
Last updated

