MockModuleOptions

sealed external interface MockModuleOptions(source)

Properties

Link copied to clipboard
abstract var cache: 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.

Link copied to clipboard
abstract var defaultExport: Any?

The value to use as the mocked module's default export.

Link copied to clipboard
abstract var namedExports: Any?

An object whose keys and values are used to create the named exports of the mock module.