Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
interface DescribeDefinition
implements Omit<Deno.TestDefinition, "fn">
Re-export
import { type DescribeDefinition } from "https://deno.land/std@0.218.0/testing/bdd.ts";

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

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.