@serenity-js/core
Version:
The core Serenity/JS framework, providing the Screenplay Pattern interfaces, as well as the test reporting and integration infrastructure
17 lines (15 loc) • 387 B
text/typescript
import type { StackFrame } from 'error-stack-parser';
import parser from 'error-stack-parser';
/**
* A thin wrapper around error-stack-parser module
*
* ## Learn more
* - [Error stack parser](https://www.npmjs.com/package/error-stack-parser)
*
* @group Errors
*/
export class ErrorStackParser {
parse(error: Error): StackFrame[] {
return parser.parse(error);
}
}