Skip to content

Commit 49dd4d7

Browse files
🪲 [Fix]: Fix conditional logic for test result handling (#92)
## Description This pull request includes a small change to the `scripts/main.ps1` file. The change modifies the conditional logic to use an `elseif` statement instead of a separate `if` statement, ensuring that the script correctly handles the cases where tests have failed or all tests have passed. * [`scripts/main.ps1`](diffhunk://#diff-dc2e5a659836b1b73abb03421c567f5018c2755677c4a0aa764cb26117b68011L55-R55): Changed the conditional logic from a separate `if` statement to an `elseif` statement to handle test results more accurately. ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [x] 🪲 [Fix] - [ ] 🩹 [Patch] - [ ] ⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas
1 parent e96fb15 commit 49dd4d7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

scripts/main.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ if (($failedTests -gt 0) -or ($testResults.Result -ne 'Passed')) {
5252
Write-GitHubError "❌ Some [$failedTests] tests failed."
5353
Set-GitHubOutput -Name 'passed' -Value $false
5454
$return = 1
55-
}
56-
if ($failedTests -eq 0) {
55+
} elseif ($failedTests -eq 0) {
5756
Write-GitHubNotice '✅ All tests passed.'
5857
Set-GitHubOutput -Name 'passed' -Value $true
5958
$return = 0

0 commit comments

Comments
 (0)