elections-cpl.api.hscc.bdpa.org • Docs
elections-cpl.api.hscc.bdpa.org / test/setup / protectedImportFactory
protectedImportFactory<
T
>(__namedParameters
): (params
?) =>Promise
<T
>
• T = unknown
• __namedParameters
• __namedParameters.expectedExitCode?: number
| "non-zero"
The code that must be passed to process.exit by the imported module. If
undefined
(default), then process.exit must not be called.
Default
undefined
• __namedParameters.path: string
Path to the module to import. Module resolution is handled by require
.
• __namedParameters.useDefault?: boolean
By default, only if module.__esModule === true
, the default export will
be returned instead. Use useDefault
to override this behavior in either
direction.
Function
• params?
• params.expectedExitCode?: number
| "non-zero"
The code that must be passed to process.exit by the imported module. If
undefined
(default), then process.exit must not be called.
Default
undefined
Promise
<T
>