[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [StackTrace](https://evolu.dev/docs/api-reference/common/StackTrace) › parseStackTrace

## Call Signature

```ts
function parseStackTrace(
  stack: string | undefined,
  options?: StackTraceOptions,
): StackTrace;
```

Defined in: [packages/common/src/StackTrace.ts:42](https://github.com/evoluhq/evolu/blob/037c390af081e9944d616ff298a729515c5c5ab7/packages/common/src/StackTrace.ts#L42)

Parses V8, SpiderMonkey, and JavaScriptCore stack frames for tests.

Warning: This is AI-slop containment code for tests, not production stack
trace parsing infrastructure.

This is intentionally not a complete stack trace parser. It extracts only
frame names and source positions needed by async stack trace tests and
similar assertions that need stable, cross-engine stack evidence.

## Call Signature

```ts
function parseStackTrace(
  run: () => Promise<never>,
  options?: StackTraceOptions,
): Promise<StackTrace>;
```

Defined in: [packages/common/src/StackTrace.ts:48](https://github.com/evoluhq/evolu/blob/037c390af081e9944d616ff298a729515c5c5ab7/packages/common/src/StackTrace.ts#L48)

Runs an async callback and parses the stack of the error it throws.