test

If at any point you think of an experiment you'd like to try out, all of the code examples below are editable.

Tests/suites expose a `test` method:  true
Calling `test` returns a new test/suite of the same type:  true

You can learn more about assert in another section of the documentation. Basically, assert is the main assertion engine that test uses to know whether or not a test has passed.

tests are passed into the child assert:  true

Tests are resolved using native Promise rules. If you're familiar with how async code works, you already know how test chaining works.

Tests are marked as unresolved before they are called:  true
Parent tests are resolved before child assertions are called:  true
Tests are called in the correct order:  true

Failed tests don't call any of their children. You can use this to make your test suite "fail fast". For example, if a database connection fails, there's no point in running tests that rely on that connection, and there's no point in cluttering up your test output with those extra failures.

Eliminating superfluous tests will make it easier to see the root cause of that particular failure.

Failed tests are marked as failed:  true
Children of failed tests have their assertions skipped:  true
Children of failed tests are marked as skipped:  true
Child is passed as a parameters:  true
Child is set to `this`:  true

You can traverse your entire test tree at any point, even while a suite is running. This is rarely necessary, but can be occasionally used in powerful ways to build very creative extensions or test reporters.

Child has a reference to the parent:  true
Parent has a reference to the child:  true
Multiple children can be attached:  true

Of course, Distilled is designed to be highly extensible.

correct prototype is attached to new suites when calling `test`:  true

Bugs

Code samples in this section demonstrate bug fixes. They're not particularly relevant to the documentation, but they help make sure that Distilled never has any regressions.

An unresolved promise will time out:  true