Home Reference Source Test Repository

Test

Description Identifier Count

should set default options if no options are given

Handler.constructor

should set new options if an options hash is passed in

Handler.constructor

should throw a TypeError exception for a non-object

Handler#createInvocationContext

should create a new "this" context additional properties

Handler#createInvocationContext

should create a new "this" context with additional properties that are deeply read-only

Handler#createInvocationContext

should throw an exception for a undefined operation

Handler#resolveEndpoint

should throw an exception for a null operation

Handler#resolveEndpoint

should throw an exception for a non-string operation

Handler#resolveEndpoint

should throw an exception for an operation that cannot be found

Handler#resolveEndpoint

should throw an exception for an operation that cannot be found (missing metadata)

Handler#resolveEndpoint

should throw an exception for an operation that cannot be found (invalid metadata)

Handler#resolveEndpoint

should return [endpoint, metadata] for valid operation

Handler#resolveEndpoint

should reject the promise for a null event

Handler#handle

should reject the promise for an undefined event

Handler#handle

should not invoke an endpoint without the @operation decorator

Handler#handle

should invoke the endpoint with correct "this" value

Handler#handle

should invoke the endpoint, succeed and call context#succeed() if present

Handler#handle

should invoke the endpoint, fail and call context#fail() if present

Handler#handle

should throw an exception for a null endpoint

Handler.getEndpointMetadata

should throw an exception for an undefined endpoint

Handler.getEndpointMetadata

should throw an exception for a non-object endpoint

Handler.getEndpointMetadata

should return undefined for an endpoint with no metadata

Handler.getEndpointMetadata

should throw an exception for an endpoint with non-object metadata

Handler.getEndpointMetadata

should return the metadata for an endpoint without error

Handler.getEndpointMetadata