-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Workaround jest non-support of mono repos
The issues in jest specifically are tracked in: kulshekhar/ts-jest#1343 kulshekhar/ts-jest#1109
- Loading branch information
Showing
2 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# This script is necessary until https://github.com/kulshekhar/ts-jest/issues/1343 is fixed. | ||
# In particular, we need this addressed: https://github.com/kulshekhar/ts-jest/issues/1109 | ||
|
||
$testOrder = Get-ChildItem "$PSScriptRoot\*cloudbuild-task-*" -Directory | ||
|
||
$failed = $false | ||
$testOrder | % { | ||
Write-Host -ForegroundColor Blue "Testing $($_.BaseName)" | ||
Push-Location $_ | ||
try { | ||
yarn jest | ||
if ($LASTEXITCODE -ne 0) { | ||
$failed = $true | ||
} | ||
} | ||
finally { | ||
Pop-Location | ||
} | ||
} | ||
|
||
if ($failed) { | ||
Write-Host -ForegroundColor Red "Overall test run failure" | ||
exit 1 | ||
} else { | ||
Write-Host -ForegroundColor Green "All tests passed!" | ||
} |