Optional
atOptional
bailBail out on the first failure
Optional
bufferedTrue if this test should be buffered, and only processed once complete.
Defaults to true when t.jobs
is set to a value greater than 1.
If set false in that case, then the test will NOT be run in parallel, so this provides a way to control the parallelism within a test suite.
Optional
childNumeric identifier attached to child tests. Most of the time, this is
set based on the TAP_CHILD_ID
environment variable.
Optional
contextAny arbitrary data that is provided to this test object. Often, this
is set in a t.before()
or t.beforeEach()
method. Scalar values
are inherited by child tests. Object values are extended in child
tests using Object.create()
.
If not set in the options, this is initialized to a null-prototyped
object, so that usage like t.context.foo = 'bar'
will work as expected.
This is initialized and set on the Test object in the runMain
method,
not at construction time. If set explicitly on the Test object in a
before
hook, then any context specified on options or inherited from
the parent test will be ignored.
Optional
debugTrue to output LOTS AND LOTS of noisy debugging information.
Set at the top level by the TAP_DEBUG
environment variable.
Optional
diagnosticOptional
diffOptional
doOptional
errorOptional
errorOptional
expiredOptional
failtreat only:true tests as failures, default false
Optional
failtreat skip tests as failures, default false
Optional
failtreat todo tests as failures, default false
Optional
foundOptional
jobsThe number of jobs to run in parallel. Defaults to 1
Optional
messageOptional
nameThe name of this test
Optional
omitDo not emit the TAP version 14
line.
Optional
parentParent test of this test
Optional
passestrack passes in the results lists, default false
Optional
patternOptional
preserveDo not elide empty lines and other unnecessary whitespace
Optional
silentSetting silent:true in a subtest option makes it completely excluded from test output, UNLESS it fails.
This was used historically for a few things which are now implemented with a more sophisticated promise management system, but can be handy in some rare situations.
Optional
skipSkip this test entirely, emitting a # SKIP
directive
Optional
sourceOptional
stackThe stack where this test was initiated
Optional
strictTreat any unknown non-TAP data as an error
May be set at run-time by the TAP stream using pragma +strict
Optional
testOptional
timeThe amount of time that this test took to complete.
Typically, this is not set explicitly, but inferred from the actual
time spent. However in some cases, it may be reported by the
top-level # time=...
comment in a TAP subprocess stream.
Optional
timeoutAmount of time in milliseconds before this test times out
Optional
todoMark this test as to be done later, emitting a # TODO
directive
Optional
typeOptional
wantedOptional
Internal
cbTest function called when this Test is executed
This is usually not set on the extra object, but as an argument to
the t.test(..)
method, just defined here so TS doesn't complain
when we reference it in the various flow control machinery.
Optional
Internal
indentNumber of spaces that this test is indented.
Optional
Internal
parserParser to use for this TAP stream.
Optional
Internal
tapThe TAP data from a buffered test.
Options that can be passed to TestBase objects