elections-cpl.api.hscc.bdpa.org • Docs
elections-cpl.api.hscc.bdpa.org / test/setup / mockOutputFactory
mockOutputFactory(
options
): (fn
,options
?) =>Promise
<void
>
• options
• options.passthrough?
Determine if spies provide mock implementations for output functions, thus preventing any output to the terminal, or if spies should passthrough output as normal.
Passthrough is disabled for all spies by default (except stdErrSpy
).
Pass true
to enable passthrough for a specific spy.
• options.passthrough.errorSpy?: boolean
Default
false
• options.passthrough.infoSpy?: boolean
Default
false
• options.passthrough.logSpy?: boolean
Default
false
• options.passthrough.stdErrSpy?: boolean
Default
true
• options.passthrough.stdoutSpy?: boolean
Default
false
• options.passthrough.warnSpy?: boolean
Default
false
Function
• fn
• options?
• options.passthrough?
Determine if spies provide mock implementations for output functions, thus preventing any output to the terminal, or if spies should passthrough output as normal.
Passthrough is disabled for all spies by default (except stdErrSpy
).
Pass true
to enable passthrough for a specific spy.
• options.passthrough.errorSpy?: boolean
Default
false
• options.passthrough.infoSpy?: boolean
Default
false
• options.passthrough.logSpy?: boolean
Default
false
• options.passthrough.stdErrSpy?: boolean
Default
true
• options.passthrough.stdoutSpy?: boolean
Default
false
• options.passthrough.warnSpy?: boolean
Default
false
Promise
<void
>