-
Notifications
You must be signed in to change notification settings - Fork 29
Closed
Labels
π bugDefect / BugDefect / Bug
Description
π What did you see?
Currently the source reference for all hooks points to io.cucumber.scala.GlueAdaptor.$anonfun$loadRegistry$8
which doesn't seem quite right.
β What did you expect to see?
A source reference inside the step definition file.
π¦ Which tool/library version are you using?
No response
π¬ How could we reproduce it?
No response
π Any additional context?
The current implementation returns the location from the stack trace created here:
cucumber-jvm-scala/cucumber-scala/src/main/scala/io/cucumber/scala/ScalaHookDefinition.scala
Line 13 in 669421a
override val location: StackTraceElement = new Exception().getStackTrace()(3) |
But this has the wrong location because hooks are created from ScalaHookDetails
in the GlueAdaptor
. The ScalaHookDetails.location
does seem to be correct. So presumably the fix would be to:
override val location: StackTraceElement = hookDetails.stackTraceElement
Metadata
Metadata
Assignees
Labels
π bugDefect / BugDefect / Bug