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

interface TestOptions | Node.js node:test module | Bun

interface TestOptions | Node.js node:test module | BunBuildDocsReferenceGuidesBlogDiscord/node:test/default/TestOptionsPconcurrencyPexpectFailurePonlyPplanPsignalPskipPtimeoutPtodo

Search the reference...

/

BuildDocsReferenceGuidesBlogDiscord/node:test/default/TestOptionsPconcurrencyPexpectFailurePonlyPplanPsignalPskipPtimeoutPtodo

interface

test.default.TestOptionsinterface TestOptionsconcurrency?: number | boolean

If a number is provided, then that many tests would run in parallel. If truthy, it would run (number of cpu cores - 1) tests in parallel. For subtests, it will be Infinity tests in parallel. If falsy, it would only run one test at a time. If unspecified, subtests inherit this value from their parent.

expectFailure?: string | boolean | AssertPredicate

If truthy, the test is expected to fail. If a non-empty string is provided, that string is displayed in the test results as the reason why the test is expected to fail. If a RegExp, Function, Object, or Error is provided directly (without wrapping in { match: … }), the test passes only if the thrown error matches, following the behavior of assert.throws. To provide both a reason and validation, pass an object with label (string) and match (RegExp, Function, Object, or Error).

only?: boolean

If truthy, and the test context is configured to run only tests, then this test will be run. Otherwise, the test is skipped.

plan?: number

The number of assertions and subtests expected to be run in the test. If the number of assertions run in the test does not match the number specified in the plan, the test will fail.

signal?: AbortSignal

Allows aborting an in-progress test.

skip?: string | boolean

If truthy, the test is skipped. If a string is provided, that string is displayed in the test results as the reason for skipping the test.

timeout?: number

A number of milliseconds the test will fail after. If unspecified, subtests inherit this value from their parent.

todo?: string | boolean

If truthy, the test marked as TODO. If a string is provided, that string is displayed in the test results as the reason why the test is TODO.

Resources

ReferenceDocsGuidesDiscordMerch StoreGitHubBlog 

Toolkit

RuntimePackage managerTest runnerBundlerPackage runner

Project

Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicense

Baked with ❤️ in San Francisco

We're hiring →

interface TestOptions | Node.js node:test module | Bun,AI智能索引,全网链接索引,智能导航,网页索引

    API documentation for interface node:test.default.TestOptions | Bun