feat: consolidate legacy parity migration baseline
This commit is contained in:
@@ -32,14 +32,23 @@ if (-not [IO.Path]::IsPathRooted($NodePath) -or
|
||||
|
||||
$repositoryRoot = [IO.Path]::GetFullPath((Join-Path $PSScriptRoot '..'))
|
||||
$appScript = Join-Path $repositoryRoot 'src\MBN_STOCK_WEBVIEW.LegacyParityApp\Web\app.js'
|
||||
$testFile = Join-Path $repositoryRoot 'tests\LegacyParityWeb\thin-client.test.cjs'
|
||||
$testRoot = Join-Path $repositoryRoot 'tests\LegacyParityWeb'
|
||||
$testFiles = @(
|
||||
Get-ChildItem -LiteralPath $testRoot -Filter '*.test.cjs' -File |
|
||||
Sort-Object -Property FullName |
|
||||
Select-Object -ExpandProperty FullName
|
||||
)
|
||||
|
||||
if ($testFiles.Count -eq 0) {
|
||||
throw 'No Legacy parity Web test files were found.'
|
||||
}
|
||||
|
||||
& $NodePath --check $appScript
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Legacy parity JavaScript syntax validation failed with exit code $LASTEXITCODE."
|
||||
}
|
||||
|
||||
& $NodePath --test $testFile
|
||||
& $NodePath --test @testFiles
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Legacy parity Web tests failed with exit code $LASTEXITCODE."
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user