Skip to content
DocsGuidesReferenceBlog
Install
HomeDocsGuidesReferenceBlog
Install Bun v1.4.4
Reference
Modules/bun:test/ExpectState
  • PassertionCalls
  • PcurrentTestName
  • PexpectedAssertionsNumber
  • PisExpectingAssertions
  • PsuppressedErrors
  • PtestPath

Modules

  • Bun
  • bun:bundle
  • bun:ffi
  • bun:jsc
  • bun:sqlite
  • bun:test
  • Globals
  • node:assert
  • node:async_hooks
  • node:buffer
  • node:child_process
  • node:cluster
  • node:crypto
  • node:dgram
  • node:diagnostics_channel
  • node:dns
  • node:dns/promises
  • node:events
  • node:ffi
  • node:fs
  • node:fs/promises
  • node:http
  • node:http2
  • node:https
  • node:inspector
  • node:inspector/promises
  • node:module
  • node:net
  • node:os
  • node:path
  • node:perf_hooks
  • node:punycode
  • node:querystring
  • node:quic
  • node:readline
  • node:readline/promises
  • node:stream
  • node:stream/consumers
  • node:stream/iter
  • node:stream/promises
  • node:stream/web
  • node:string_decoder
  • node:test
  • node:test/reporters
  • node:timers/promises
  • node:tls
  • node:trace_events
  • node:tty
  • node:url
  • node:util
  • node:util/types
  • node:v8
  • node:vfs
  • node:vm
  • node:wasi
  • node:worker_threads
  • node:zlib
  • node:zlib/iter

interface

test.ExpectState

interface ExpectState

  • assertionCalls: number

    The number of assertions the current test has made.

  • currentTestName?: string

    The enclosing describe blocks' names and the current test's name, joined by a space.

  • expectedAssertionsNumber: null | number

    The number passed to expect.assertions(), if it was called in the current test.

  • isExpectingAssertions: boolean

    Whether expect.hasAssertions() was called in the current test.

  • suppressedErrors: Error[]

    Always empty.

  • testPath?: string

    The absolute path of the current test file.