[Spec lib improvements] Prepend describe
block names to spec names
#141
Labels
feature-request
Any request for a new feature of the language. Includes both syntax and library features.
stdlib
Any issue relating to the standard library (Myst code) of Myst.
Milestone
This is part of a family of issues relating to Spec library improvements.
When defining specs within a
describe
block, it's common for those specs to have thedescribe
blocks name prepended to their name in all places where the name of the spec is presented.For example, with a spec suite like this:
The error output should have the spec name "Some object does a thing".
Generally, this is done by having a
Context
object that holds onto the current name path at that point in the code. Entering adescribe
block would then push a newContext
object to a stack, and eachit
block would then read the name path from theContext
object at the top of that stack and prepend it to the given name for the spec when creating theSingleSpec
instance.An implementation like this should also work with nested
describe
blocks.The text was updated successfully, but these errors were encountered: