Files
jiapuapp/tests/capture-g08-states-contract.ps1
T
2026-07-20 06:52:33 +08:00

9 lines
561 B
PowerShell

$ErrorActionPreference = 'Stop'
$root = Split-Path -Parent $PSScriptRoot
$capture = Get-Content -LiteralPath (Join-Path $root 'scripts/capture-chrome-page.js') -Raw -Encoding utf8
foreach ($required in @('prepareG08State', 'g08-validation', 'g08-submitting', 'g08-error', 'g08-success')) {
if ($capture -notmatch [regex]::Escape($required)) { throw "G08 capture state missing: $required" }
}
if ($capture -notmatch 'await prepareG08State\(send, action\)') { throw 'Capture runner does not prepare G08 states' }
Write-Output 'CAPTURE-G08-STATES-CONTRACT PASS'