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

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

interface MockModuleOptions | Node.js node:test module | BunBuildDocsReferenceGuidesBlogDiscord/node:test/default/MockModuleOptionsPcachePexports

Search the reference...

/

BuildDocsReferenceGuidesBlogDiscord/node:test/default/MockModuleOptionsPcachePexports

interface

test.default.MockModuleOptionsinterface MockModuleOptionscache?: boolean

If false, each call to require() or import() generates a new mock module. If true, subsequent calls will return the same module mock, and the mock module is inserted into the CommonJS cache.

exports?: object

Optional mocked exports. The default property, if provided, is used as the mocked module's default export. All other own enumerable properties are used as named exports. This option cannot be used with defaultExport or namedExports.

If the mock is a CommonJS or builtin module, exports.default is used as the value of module.exports.If exports.default is not provided for a CommonJS or builtin mock, module.exports defaults to an empty object.If named exports are provided with a non-object default export, the mock throws an exception when used as a CommonJS or builtin module.

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 MockModuleOptions | Node.js node:test module | Bun,AI智能索引,全网链接索引,智能导航,网页索引

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