Skip to main content
Home

@std/testing@1.0.14
Built and signed on GitHub Actions

Tools for testing Deno code like snapshot testing, bdd testing, and time mocking

This package works with Deno
This package works with Deno
JSR Score
94%
Published
a day ago (1.0.14)
interface DescribeDefinition
extends Omit<Deno.TestDefinition, "fn">

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

Type Parameters

Properties

optional
fn: () => void | undefined

The body of the test suite

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.

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@std/testing

Import symbol

import { type DescribeDefinition } from "@std/testing/bdd";
or

Import directly with a jsr specifier

import { type DescribeDefinition } from "jsr:@std/testing/bdd";