Replies: 1 comment
-
I can't reproduce this and it should be the opposite in general. Global variables are always available.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If I put the following in the discovery space or beforeAll block I am able to access
$table.myVariable
in any of the test blocks.However, regardless of where I put
$global:myVariable
I am not able to access it.Why is this? Is there a 'proper' way of setting variables in Pester? I'm trying to pull some metadata from my tests to help automate my documentation and this would be really useful. I'm happy using the first example but am interested in how it works.
Beta Was this translation helpful? Give feedback.
All reactions