wallet-core/node_modules/ava/lib/extract-stack.js

11 lines
215 B
JavaScript
Raw Normal View History

2017-05-28 00:38:50 +02:00
'use strict';
const stackLineRegex = /^.+ \(.+:[0-9]+:[0-9]+\)$/;
module.exports = stack => {
return stack
.split('\n')
.filter(line => stackLineRegex.test(line))
.map(line => line.trim())
.join('\n');
};