Lupa API Reference / @pawel-up/lupa/testing / test
Function: test()
test(
title,callback?):Test<undefined>
Defined in: src/testing/api.ts:97
Define a new test.
The test callback receives a TestContext which provides access to assertions, fixtures, and other test utilities.
Parameters
title
string
The name of the test.
callback?
(context, done) => void | Promise<void>
The function containing the test logic. Can be synchronous or asynchronous.
Returns
Test<undefined>
Example
ts
test('math works', ({ assert }) => {
assert.equal(1 + 1, 2)
})