Skip to main content

@babia-test/bdd@0.0.2

latest
Works with
JSR Score
58%
Published
a week ago
indexDescribeDefinition
interface DescribeDefinition
extends Omit<Deno.TestDefinition, "fn">
deno add @babia-test/bdd
import { type DescribeDefinition } from "@babia-test/bdd";
npx jsr add @babia-test/bdd
import { type DescribeDefinition } from "@babia-test/bdd";
yarn dlx jsr add @babia-test/bdd
import { type DescribeDefinition } from "@babia-test/bdd";
pnpm dlx jsr add @babia-test/bdd
import { type DescribeDefinition } from "@babia-test/bdd";
bunx jsr add @babia-test/bdd
import { type DescribeDefinition } from "@babia-test/bdd";

The options for creating a test suite with the describe function.

Type Parameters

Properties

optional
fn: () => void
optional
suite: TestSuite<T>

The describe function returns a TestSuite representing the group of tests. If describe is called within another describe calls fn, the suite will default to that parent describe calls returned TestSuite. If describe is not called within another describe calls fn, the suite will default to the TestSuite representing the global group of tests.

optional
beforeAll: ((this: T) => void | Promise<void>) | ((this: T) => void | Promise<void>)[]

Run some shared setup before all of the tests in the suite.

optional
afterAll: ((this: T) => void | Promise<void>) | ((this: T) => void | Promise<void>)[]

Run some shared teardown after all of the tests in the suite.

optional
beforeEach: ((this: T) => void | Promise<void>) | ((this: T) => void | Promise<void>)[]

Run some shared setup before each test in the suite.

optional
afterEach: ((this: T) => void | Promise<void>) | ((this: T) => void | Promise<void>)[]

Run some shared teardown after each test in the suite.