This creates a pattern for defining tasks as unit tests, using interpolation to iterate over the tests, even though there is no task target - a really nice way to setup testing in a codebase!
Example:
[[task]]
name = "test:unit"
dep = "unit/#.js"
run = "node $DEP"
With this pattern chomp test:unit is a full unit test runner, and displays ticks and crosses since all tasks are already based on being either an error or a success. By default unit tests will run in parallel, and setting serial = true will run unit tests serially. All within the same simple task system.
This creates a pattern for defining tasks as unit tests, using interpolation to iterate over the tests, even though there is no task target - a really nice way to setup testing in a codebase!
Example:
With this pattern
chomp test:unit
is a full unit test runner, and displays ticks and crosses since all tasks are already based on being either an error or a success. By default unit tests will run in parallel, and settingserial = true
will run unit tests serially. All within the same simple task system.