You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Linking MR that adds OmitWhen for reference and it does not have the example about my use case.
In my example below, when the condition is true, is randomFunction supposed to be invoked? My understanding was that when the condition is met, everything in omitWhen will be omitted.
Hey @hoangtran-97, thank you for this callout. Yes, this is the expected behavior. I should add it to the documentation.
omitWhen does indeed run everything in its scope. The one thing that doesn't run is the test callback. The reason for it is that Vest keeps track of the tests within it and registers them.
If there's a portion of non vest code that you'd like to omit, you can safely wrap it in a condition (note - do not put Vest api functions in a condition, as it would interfere with this internal registration)
Linking MR that adds OmitWhen for reference and it does not have the example about my use case.
In my example below, when the condition is
true
, israndomFunction
supposed to be invoked? My understanding was that when the condition is met, everything inomitWhen
will be omitted.The text was updated successfully, but these errors were encountered: