aboutsummaryrefslogtreecommitdiff
path: root/node_modules/ava/lib/extract-stack.js
blob: 64f63db1c6c18822cc7722a298182bda0c1dbf21 (plain)
1
2
3
4
5
6
7
8
9
10
'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');
};