温馨提示:本站仅提供公开网络链接索引服务,不存储、不篡改任何第三方内容,所有内容版权归原作者所有
AI智能索引来源:http://www.bun.com/reference/node/test/default/EventData
点击访问原文链接

namespace EventData | Node.js node:test module | Bun

namespace EventData | Node.js node:test module | BunBuildDocsReferenceGuidesBlogDiscord/node:test/default/EventDataNEventData

Search the reference...

/

BuildDocsReferenceGuidesBlogDiscord/node:test/default/EventDataNEventData

namespace

test.default.EventDatanamespace EventDatainterface Errorcause: ErrorThe cause of the error.

message: stringname: stringstack?: stringinterface LocationInfocolumn?: numberThe column number where the test is defined, or undefined if the test was run through the REPL.

file?: stringThe path of the test file, undefined if test was run through the REPL.

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

interface TestCompletecolumn?: numberThe 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' | 'test' }Additional execution metadata.

file?: stringThe path of the test file, undefined if test was run through the REPL.

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

name: stringThe test name.

nesting: numberThe nesting level of the test.

skip?: string | booleanPresent if context.skip is called.

testNumber: numberThe ordinal number of the test.

todo?: string | booleanPresent if context.todo is called.

interface TestCoveragenesting: numberThe 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 TestDequeuecolumn?: numberThe column number where the test is defined, or undefined if the test was run through the REPL.

file?: stringThe path of the test file, undefined if test was run through the REPL.

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

name: stringThe test name.

nesting: numberThe nesting level of the test.

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

interface TestDiagnosticcolumn?: numberThe column number where the test is defined, or undefined if the test was run through the REPL.

file?: stringThe path of the test file, undefined if test was run through the REPL.

level: 'error' | 'info' | 'warn'The severity level of the diagnostic message. Possible values are:

'info': Informational messages.'warn': Warnings.'error': Errors.line?: numberThe line number where the test is defined, or undefined if the test was run through the REPL.

message: stringThe diagnostic message.

nesting: numberThe nesting level of the test.

interface TestEnqueuecolumn?: numberThe column number where the test is defined, or undefined if the test was run through the REPL.

file?: stringThe path of the test file, undefined if test was run through the REPL.

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

name: stringThe test name.

nesting: numberThe nesting level of the test.

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

interface TestFailcolumn?: numberThe column number where the test is defined, or undefined if the test was run through the REPL.

details: { attempt: number; duration_ms: number; error: Error; type: 'suite' | 'test' }Additional execution metadata.

file?: stringThe path of the test file, undefined if test was run through the REPL.

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

name: stringThe test name.

nesting: numberThe nesting level of the test.

skip?: string | booleanPresent if context.skip is called.

testNumber: numberThe ordinal number of the test.

todo?: string | booleanPresent if context.todo is called.

interface TestPasscolumn?: numberThe column number where the test is defined, or undefined if the test was run through the REPL.

details: { attempt: number; duration_ms: number; passed_on_attempt: number; type: 'suite' | 'test' }Additional execution metadata.

file?: stringThe path of the test file, undefined if test was run through the REPL.

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

name: stringThe test name.

nesting: numberThe nesting level of the test.

skip?: string | booleanPresent if context.skip is called.

testNumber: numberThe ordinal number of the test.

todo?: string | booleanPresent if context.todo is called.

interface TestPlancolumn?: numberThe column number where the test is defined, or undefined if the test was run through the REPL.

count: numberThe number of subtests that have ran.

file?: stringThe path of the test file, undefined if test was run through the REPL.

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

nesting: numberThe nesting level of the test.

interface TestStartcolumn?: numberThe column number where the test is defined, or undefined if the test was run through the REPL.

file?: stringThe path of the test file, undefined if test was run through the REPL.

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

name: stringThe test name.

nesting: numberThe nesting level of the test.

interface TestStderrfile: stringThe path of the test file.

message: stringThe message written to stderr.

interface TestStdoutfile: stringThe path of the test file.

message: stringThe message written to stdout.

interface TestSummarycounts: { 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: numberThe duration of the test run in milliseconds.

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

success: booleanIndicates 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.

Resources

ReferenceDocsGuidesDiscordMerch StoreGitHubBlog 

Toolkit

RuntimePackage managerTest runnerBundlerPackage runner

Project

Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco

We're hiring →

智能索引记录