TestRunner

Test-Runner. TestRunner

TestRunner is the main executor to run JavaScript tests.

Constructor

new TestRunner()

Source:

Methods

(async) importTests(entryPointopt)

Loads tests from files to the runner recursively.

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

The path that serves as the starting point for loading tests.

(async) run()

Runs all the registered tests as a test suite.

Source:

test(description, testFn)

Registers a new test to the runner.

Source:
Parameters:
Name Type Description
description String

A brief description of the test.

testFn function

The test function where the actual test logic is implemented.