NEventData
Bun

namespace

test.default.EventData

namespace EventData

  • interface Error

  • interface LocationInfo

    • column?: number

      The column number where the test is defined, or undefined if the test was run through the REPL.

    • file?: string

      The path of the test file, undefined if test was run through the REPL.

    • line?: number

      The line number where the test is defined, or undefined if the test was run through the REPL.

  • interface TestComplete

    • column?: number

      The column number where the test is defined, or undefined if the test was run through the REPL.

    • details: { duration_ms: number; error: Error; passed: boolean; type: 'suite' }

      Additional execution metadata.

    • file?: string

      The path of the test file, undefined if test was run through the REPL.

    • line?: number

      The line number where the test is defined, or undefined if the test was run through the REPL.

    • name: string

      The test name.

    • nesting: number

      The nesting level of the test.

    • skip?: string | boolean

      Present if context.skip is called.

    • testNumber: number

      The ordinal number of the test.

    • todo?: string | boolean

      Present if context.todo is called.

  • interface TestCoverage

    • nesting: number

      The nesting level of the test.

    • summary: { files: { branches: { count: number; line: number }[]; coveredBranchCount: number; coveredBranchPercent: number; coveredFunctionCount: number; coveredFunctionPercent: number; coveredLineCount: number; coveredLinePercent: number; functions: { count: number; line: number; name: string }[]; lines: { count: number; line: number }[]; path: string; totalBranchCount: number; totalFunctionCount: number; totalLineCount: number }[]; thresholds: { branch: number; function: number; line: number }; totals: { coveredBranchCount: number; coveredBranchPercent: number; coveredFunctionCount: number; coveredFunctionPercent: number; coveredLineCount: number; coveredLinePercent: number; totalBranchCount: number; totalFunctionCount: number; totalLineCount: number }; workingDirectory: string }

      An object containing the coverage report.

  • interface TestDequeue

    • column?: number

      The column number where the test is defined, or undefined if the test was run through the REPL.

    • file?: string

      The path of the test file, undefined if test was run through the REPL.

    • line?: number

      The line number where the test is defined, or undefined if the test was run through the REPL.

    • name: string

      The test name.

    • nesting: number

      The nesting level of the test.

    • type: 'suite' | 'test'

      The test type. Either 'suite' or 'test'.

  • interface TestDiagnostic

    • column?: number

      The column number where the test is defined, or undefined if the test was run through the REPL.

    • file?: string

      The path of the test file, undefined if test was run through the REPL.

    • line?: number

      The line number where the test is defined, or undefined if the test was run through the REPL.

    • message: string

      The diagnostic message.

    • nesting: number

      The nesting level of the test.

  • interface TestEnqueue

    • column?: number

      The column number where the test is defined, or undefined if the test was run through the REPL.

    • file?: string

      The path of the test file, undefined if test was run through the REPL.

    • line?: number

      The line number where the test is defined, or undefined if the test was run through the REPL.

    • name: string

      The test name.

    • nesting: number

      The nesting level of the test.

    • type: 'suite' | 'test'

      The test type. Either 'suite' or 'test'.

  • interface TestFail

    • column?: number

      The column number where the test is defined, or undefined if the test was run through the REPL.

    • details: { duration_ms: number; error: Error; type: 'suite' }

      Additional execution metadata.

    • file?: string

      The path of the test file, undefined if test was run through the REPL.

    • line?: number

      The line number where the test is defined, or undefined if the test was run through the REPL.

    • name: string

      The test name.

    • nesting: number

      The nesting level of the test.

    • skip?: string | boolean

      Present if context.skip is called.

    • testNumber: number

      The ordinal number of the test.

    • todo?: string | boolean

      Present if context.todo is called.

  • interface TestPass

    • column?: number

      The column number where the test is defined, or undefined if the test was run through the REPL.

    • details: { duration_ms: number; type: 'suite' }

      Additional execution metadata.

    • file?: string

      The path of the test file, undefined if test was run through the REPL.

    • line?: number

      The line number where the test is defined, or undefined if the test was run through the REPL.

    • name: string

      The test name.

    • nesting: number

      The nesting level of the test.

    • skip?: string | boolean

      Present if context.skip is called.

    • testNumber: number

      The ordinal number of the test.

    • todo?: string | boolean

      Present if context.todo is called.

  • interface TestPlan

    • column?: number

      The column number where the test is defined, or undefined if the test was run through the REPL.

    • count: number

      The number of subtests that have ran.

    • file?: string

      The path of the test file, undefined if test was run through the REPL.

    • line?: number

      The line number where the test is defined, or undefined if the test was run through the REPL.

    • nesting: number

      The nesting level of the test.

  • interface TestStart

    • column?: number

      The column number where the test is defined, or undefined if the test was run through the REPL.

    • file?: string

      The path of the test file, undefined if test was run through the REPL.

    • line?: number

      The line number where the test is defined, or undefined if the test was run through the REPL.

    • name: string

      The test name.

    • nesting: number

      The nesting level of the test.

  • interface TestStderr

    • file: string

      The path of the test file.

    • message: string

      The message written to stderr.

  • interface TestStdout

    • file: string

      The path of the test file.

    • message: string

      The message written to stdout.

  • interface TestSummary

    • counts: { cancelled: number; passed: number; skipped: number; suites: number; tests: number; todo: number; topLevel: number }

      An object containing the counts of various test results.

    • duration_ms: number

      The duration of the test run in milliseconds.

    • file: undefined | string

      The path of the test file that generated the summary. If the summary corresponds to multiple files, this value is undefined.

    • success: boolean

      Indicates whether or not the test run is considered successful or not. If any error condition occurs, such as a failing test or unmet coverage threshold, this value will be set to false.