Creates a test closure.
The name of your test
The function for your test
The timeout for an async function test
Experimental and should be avoided.
Use if you keep duplicating the same test with different data. .each
allows you to write the
test once and pass data in.
.each
is available with two APIs:
test.each(table)(name, fn)
table
: Array of Arrays with the arguments that are passed into the test fn for each row.name
: String the title of the test block.fn
: Function the test to be ran, this is the function that will receive the parameters in each row as function arguments.test.each table(name, fn)
table
: Tagged Template Literalname
: String the title of the test, use $variable
to inject test data into the test title from the tagged template expressions.fn
: Function the test to be ran, this is the function that will receive the test data object..Only runs this test in the current file.
Skips running this test in the current file.
Sketch out which tests to write in the future.
Creates a test closure