In my use case it actually concerns the using module ... statement but the general issue might be simply reproduced with any using statement as using namespace ...:
Taken the following test:
Using namespace System.Collections
Using namespace System.Collections.Generic
Describe 'Describe-Using' {
Context 'Using' {
It 'Should use the using statement' {
'Test' | Should -not -BeOfType [IList]
}
}
}
The pester test runs fine when ran completely (e.g. by pressing F5).
But when invoked in individually (right click on the test --> Run Pester Tests), it apparently doesn't recognize the general using statements for the individual tests, and fails the tests:
