Package Exports
- @mbtest/mountebank-formatters
- @mbtest/mountebank-formatters/src/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@mbtest/mountebank-formatters) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Formatters
As of v2.4.0, mountebank supports custom formatters.
A formatter consists of two functions:
load, which loads the--configfileused to start mountebanksave, which saves the test data captured in a running process of mountebank using themb savecommand
Those two functions should work in concert, so you can round-trip the configuration. In other words, the following should always work for the same formatter:
mb save --savefile mb.json --formatter path/to/customFormatter
mb restart --configfile mb.json --formatter path/to/customFormatterFor years, mountebank supported EJS templating, which could be turned off using the --noParse CLI flag.
When EJS made a breaking change, mountebank couldn't accept it because it would break existing config files.
That has now been modularized into this module (allowing mountebank core to upgrade EJS), and remains
the default option for backwards compatibility. However, now mountebank supports configurable formatters.