code: function regexpFlags(regexp) {
    let flags = regexp.flags
    if (flags === undefined) {
      flags = ''
      if (regexp.ignoreCase) flags += 'i'
      if (regexp.global) flags += 'g'
      if (regexp.multiline) flags += 'm'
    }
    return flags
  }
docs: Backport RegExp.flags for Node 4.x https://github.com/nodejs/node/issues/8390  For some strange reason this is not needed for `./mocha dist/test`, but it is needed for `./mocha dist/test/parameter_type_test.js`