| 34912 | const EventEmitter = __webpack_require__(69).EventEmitter; |
| 34913 | |
| 34914 | function stringifyLangArgs(args) { |
| 34915 | return args.map(function (val) { |
| 34916 | if (val != null && val.inspect) { |
| 34917 | return val.inspect(); |
| 34918 | } else { |
| 34919 | try { |
| 34920 | const str = JSON.stringify(val) || val + ''; |
| 34921 | // should match all literal line breaks and |
| 34922 | // "u001b" that follow an odd number of backslashes and convert them to ESC |
| 34923 | // we do this because the JSON.stringify process has escaped these characters |
| 34924 | return str.replace(/((?:^|[^\\])(?:\\{2})*)\\u001[bB]/g, '$1\u001b').replace(/[\\]r[\\]n|([\\])?[\\]n/g, (match, precededBacklash) => { |
| 34925 | // precededBacklash not null when "\n" is preceded by a backlash ("\\n") |
| 34926 | // match will be "\\n" and we don't replace it with os.EOL |
| 34927 | return precededBacklash ? match : (_os || _load_os()).default.EOL; |
| 34928 | }); |
| 34929 | } catch (e) { |
| 34930 | return util.inspect(val); |
| 34931 | } |
| 34932 | } |
| 34933 | }); |
| 34934 | } |
| 34935 | |
| 34936 | class BaseReporter { |
| 34937 | constructor(opts = {}) { |