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.
property exports | Node.js node:test module | Bun BuildDocsReferenceGuidesBlogDiscord/node:test/default/MockModuleOptions/exportsPexports BuildDocsReferenceGuidesBlogDiscord /node:test/default/MockModuleOptions/exportsPexports test.default.MockModuleOptions.exportsexports?: object
Search the reference...
/
property
Resources
ReferenceDocsGuidesDiscordMerch StoreGitHubBlogToolkit
RuntimePackage managerTest runnerBundlerPackage runnerProject
Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco
We're hiring →property exports | Node.js node:test module | Bun,AI智能索引,全网链接索引,智能导航,网页索引
- Optional mocked exports. The `default` property, if
provided, is used as the mocked module