$ npm install assertion-error-formatter
Format errors to display a diff between the actual and expected
Originally extracted from mocha
import {format} from 'assertion-error-formatter'
format(error)
format(error [, options])error: a javascript erroroptions: An object with the following keys:
colorFns: An object with the keys 'diffAdded', 'diffRemoved', 'errorMessage', 'errorStack'. The values are functions to colorize a string, each defaults to identity.inlineDiff: boolean (default: false)
© 2010 - cnpmjs.org x YWFE | Home | YWFE