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.
class TestSuiteInternal
implements TestSuite<T>
import { TestSuiteInternal } from "https://deno.land/std@0.171.0/testing/_test_suite.ts";

An internal representation of a group of tests.

Constructors

new
TestSuiteInternal(describe: DescribeDefinition<T>)

Properties

protected
describe: DescribeDefinition<T>
protected
hasOnlyStep: boolean
protected
steps: (TestSuiteInternal<T> | ItDefinition<T>)[]
symbol: symbol

Static Properties

active: symbol[]

The stack of tests that are actively running.

current: TestSuiteInternal<any> | null

The current test suite being registered.

runningCount: number

Stores how many test suites are executing.

started: boolean

If a test has been registered yet. Block adding global hooks if a test has been registered.

suites: Map<symbol, TestSuiteInternal<any>>

A map of all test suites by symbol.

Static Methods

addingOnlyStep<T>(suite: TestSuiteInternal<T>)

Updates all steps within top level suite to have ignore set to true if only is not set to true on step.

addStep<T>(suite: TestSuiteInternal<T>, step: TestSuiteInternal<T> | ItDefinition<T>)

This is used internally to add steps to a test suite.

This is used internally to register tests.

This is used internally for testing this module.

run<T>(
suite: TestSuiteInternal<T>,
context: T,
)

This is used internally to run all steps for a test suite.

runTest<T>(
fn: (this: T, t: Deno.TestContext) => void | Promise<void>,
context: T,
activeIndex?,
)
setHook<T>(
suite: TestSuiteInternal<T>,
name: HookNames,
fn: (this: T) => void | Promise<void>,
)

This is used internally to add hooks to a test suite.