From 8a4498d3233da2071c25a326e715f8d828b35763 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 18 Aug 2020 15:59:05 +0300 Subject: [PATCH] notes and docs... Signed-off-by: Alex A. Naanou --- README.md | 40 +++++++++++++++++++++++++++++++++++++++- test.js | 2 ++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6615318..e5e52be 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,13 @@ # test.js experimental test runner.... +- [test.js](#testjs) + - [Architecture](#architecture) + - [Combinational testing](#combinational-testing) + - [Unit testing](#unit-testing) + - [Basic usage](#basic-usage) + + ## Architecture This package implements two testing schemes: @@ -40,4 +47,35 @@ This makes it simple to define procedural/generative tests. ### Unit testing -This is the traditional self-contained test approach. \ No newline at end of file +This is the traditional self-contained test approach. + + +## Basic usage + +```javascript +var test = require('ig-test') + +test.Setups({ + basic: function(assert){ + return { + a: 123, + b: 321, + } }, +}) + +test.Tests({ + +}) + + +// make the test runnable as a standalone script... +__filename == (require.main || {}).filename + && tests.run() +``` + +```shell_session +$ runtests +``` + + + \ No newline at end of file diff --git a/test.js b/test.js index 46eaf32..3f2d2ed 100644 --- a/test.js +++ b/test.js @@ -9,6 +9,8 @@ * * TODO: * - flexible test chains with 0 or more modifiers... +* - might be a good idea to detect test module type and run only our +* ones... * * ***********************************************/ /* c8 ignore next 2 */