Skip to content

stackBacktrace is removed in JS when the NoOpAtriumErrorAdjuster is used #1383

@robstoll

Description

@robstoll

Affected Version

0.18.0

API

fluent-en_GB

Platform

js

Kotlin Version

1.4

How to reproduce the problem?

See ch.tutteli.atrium.reporting.erroradjusters.AdjustStackTest -> noOp_containsMochaAndAtrium
Make the test fail, stackBacktrace is not in the output

Describe the bug

I already analysed the bug, the feature is in the output just before we throw AtriumError in RootExpectImpl.
Nonetheless, the error message doesn't show it afterwards. I guess that either mocha or Kotlin does some rewrite of the error message. It's strange that we don't loose the information if use a subclass of FilterAtriumErrorAdjuster where FilterAtriumErrorAdjuster re-assigns stack after filtering (i.e. sets the property on the instance itself where beforehand it might be on an inherited prototype).

Anyhow, I suggest we use FilterAtriumErrorAdjuster which makes sense anyway as we rewrite certain stacktraces so that intellij can pick them up as clickable links.

Expected behaviour

the error message of Atrium is not filtered

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions