A babel/register
style hook to load yaml files.
It allows your mocha tests to use code with imports like:
import swaggerDoc from './swagger.yaml';
$ npm install --save-dev mocha-yaml-loader
$ yarn add --dev mocha-yaml-loader
mocha --require mocha-yaml-loader