refactor: use python instead of javascript

This commit is contained in:
Bjarke Sporring
2026-01-05 12:21:48 +01:00
parent e1b8d8418a
commit f11f5a4646
14 changed files with 550 additions and 735 deletions

View File

@@ -55,13 +55,13 @@ Write-Host "[PASS] Bugfix branch exists!" -ForegroundColor Green
# Check bugfix branch for the fix
git checkout bugfix 2>$null | Out-Null
if (-not (Test-Path "calculator.js")) {
Write-Host "[FAIL] calculator.js not found on bugfix branch." -ForegroundColor Red
if (-not (Test-Path "calculator.py")) {
Write-Host "[FAIL] calculator.py not found on bugfix branch." -ForegroundColor Red
Set-Location ../..
exit 1
}
$bugfixCalc = Get-Content "calculator.js" -Raw
$bugfixCalc = Get-Content "calculator.py" -Raw
# Check if division by zero check was added
if ($bugfixCalc -notmatch "b === 0|b == 0|division by zero|divide by zero") {
@@ -85,12 +85,12 @@ Write-Host "[PASS] Bug fixed on bugfix branch!" -ForegroundColor Green
# Check feature branch for continued work
git checkout feature-advanced-math 2>$null | Out-Null
$featureCalc = Get-Content "calculator.js" -Raw
$featureCalc = Get-Content "calculator.py" -Raw
# Check if square root function was added
if ($featureCalc -notmatch "sqrt|squareRoot") {
Write-Host "[FAIL] Square root function not found on feature branch." -ForegroundColor Red
Write-Host "Hint: Add the square root method to calculator.js on feature-advanced-math branch" -ForegroundColor Yellow
Write-Host "Hint: Add the square root method to calculator.py on feature-advanced-math branch" -ForegroundColor Yellow
Set-Location ../..
exit 1
}