Alex A. Naanou 10f1923ebf added total test count to -l...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2020-08-17 03:12:12 +03:00
2020-08-08 09:22:42 +03:00
2020-08-07 17:09:48 +03:00
2020-08-17 03:12:12 +03:00
2020-08-14 01:42:01 +03:00
2020-08-14 15:59:52 +03:00
2020-08-17 03:12:12 +03:00

test.js

experimental test runner....

Architecture

This package implements two testing schemes:

  • Combinational testing
    Here the user sets up a set of Setup, Modifier and Test functions and the system chains different combinations of the three and runs them.
  • Unit testing
    Simple independent tests.

Combinational testing

In general the idea here is that you define three things:

  • Setups that build a test context and objects (the setup),
  • Modifiers that modify the setup in some way,
  • Tests that test some aspect of a setup.

The system builds chains in the form:

setup -> modifier* -> test

Where modifier can me either single or a chain of modifiers.

A setup and modifier can also include assertions/tests for direct testing and sanity checks.

The system defines a blank pass-through modifier and test, to alleviate the requirement on the user to define at least one modifier and test, so in cases where it makes no sense only a setup is required.

Note that each element can reference and re-use other elements so for example a modifier can call (re-use) other modifiers to avoid code duplication.

This makes it simple to define procedural/generative tests.

Unit testing

This is the traditional self-contained test approach.

Description
experimental test runner....
Readme BSD-3-Clause 95 KiB
Languages
JavaScript 100%