A default timeout for various asynchronous actions, in milliseconds.
Default value is 15000ms.
Whether this test is "todo" or not. Todo tests are considered work in progress and expected to fail. The failed assertions in them are not reported. In opposite, the passed assertions from the todo tests are reported.
Either a Date
instance or a string, recognized by the Date constructor.
If this config is specified, and the test is running prior the specified date, the test will be switched to todo mode.
For example in the project file:
project.plan(
{
filename : 'some_test.t.js',
// choose the unsnooze date wisely
snooze : '2021-12-25'
}
)
in the test file:
it({
title : 'Some test',
snooze : '2022-01-01'
}, async t => {
...
})
The human-readable title of this test.
The url for this test, relative to the parent descriptor. It can also be an absolute url.
By convention, Siesta tests should have *.t.js
extension.
For the top-level descriptors, url
is relative to the project file itself.
For example:
project.plan(
{
// relative to project file
url : 'some_directory',
items : [
// relative to `some_directory`
{ url : 'test_1.t.js' }
// or just:
'test_2.t.js',
]
}
)
A default poll interval for the waitFor assertion, in milliseconds.
Default value is 50ms.
A default timeout for the waitFor assertion, in milliseconds. If not provided, the defaultTimeout will be used.
This is a type-safe static constructor method, accepting a single argument. If that argument is already an instance of this class - it is returned right away, otherwise the new constructor is used for instantiation.
This is a type-safe static constructor method, accepting a single argument, with the object, corresponding to the class properties. It will generate a compilation error, if unknown property is provided.
For example:
class MyClass extends Base {
prop : string
}
const instance : MyClass = MyClass.new({ prop : 'prop', wrong : 11 })
will produce:
TS2345: Argument of type '{ prop: string; wrong: number; }' is not assignable to parameter of type 'Partial<MyClass>'.
Object literal may only specify known properties, and 'wrong' does not exist in type 'Partial<MyClass>'
The only thing this constructor does is create an instance and call the initialize method on it, forwarding the first argument. The customization of instance is supposed to be performed in that method.
Generated using TypeDoc
Test descriptor class for tests running in the Deno environment.