Hello Everyone! I am just a beginner with Pester and I am trying to evaluate some text for Unit Testing.
I have an array with two (2) items on it:
@('serviceAccount:test1@-project-accounts.iam.gserviceaccount.com', 'serviceAccount:sa-test2@test2.iam.gserviceaccount.com') |
$testarray = @('serviceAccount:test1@-project-accounts.iam.gserviceaccount.com', 'serviceAccount:sa-test2@test2.iam.gserviceaccount.com') |
$testarray -contains "service" Result -> False |
$testarray | Should -Contain "service" InvalidResult: Line |1 | $testarray | Should -Contain "service" | Expected 'service' to be found in collection @('serviceAccount:test1@-project-accounts.iam.gserviceaccount.com', 'serviceAccount:sa-test2@test2.iam.gserviceaccount.com'), but it was not found. |
If you need more information I can provide it!
Thank you.