JacaTester

JacaTester

Jacaranda tester.

Constructor

new JacaTester()

Source:

Members

throw_

Test if an async function throws an error

Source:

Methods

attach(name, value)

Attach an object in a test case report.

Source:
Parameters:
Name Type Description
name String

Name of the attachment.

value *

Value of the attachment.

(async) benchmark_(mapOfMethods, verifier, payload)

Run benchmark against given methods.

Source:
Parameters:
Name Type Description
mapOfMethods *

Map of name to function with payload

verifier *

Function to verify the result of each method

payload *

(async) closeAllServers_()

Stop all running servers.

Source:

loadFixtures(testCaseopt)

Load fixtures and declare test case with it.

Source:
Parameters:
Name Type Attributes Description
testCase function <optional>

Test case to run after loading fixtures. async (data) => {}

param(name, value)

Record a parameter in a test case report.

Source:
Parameters:
Name Type Description
name String

Name of the parameter.

value *

Value of the parameter.

(async) startServer_(nameopt, optionsopt)

Start a server for code coverage testing.

Source:
Parameters:
Name Type Attributes Description
name String <optional>

Name of the server to start, should be configured in test config.

options Object <optional>

(async) startWorker_(nameopt, testToRun, optionsopt)

Start a worker app for testing

Source:
Parameters:
Name Type Attributes Description
name String <optional>

Name of the worker to start.

testToRun function

Test (async) function to run.

options * <optional>

Options for starting the worker.

(async) step_(name, fn)

Mark a step of a test case.

Source:
Parameters:
Name Type Description
name String

Name of the step.

fn function

Function to run.

(async) stopServer_(server)

Stop a running server.

Source:
Parameters:
Name Type Description
server WebServer

(async) withClient_(server, authenticatoropt, testToRun, options)

Create a http client for testing.

Source:
Parameters:
Name Type Attributes Description
server String | WebServer
authenticator String | function <optional>
testToRun function
options *