Skip to content

Commit c6c9ad1

Browse files
test(preview): escape apostrophes in Windows listener fixtures
1 parent 413c0e4 commit c6c9ad1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎apps/server/src/preview/PortScanner.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,7 @@ effectIt.live(
697697
if ((yield* HostProcessPlatform) !== "win32") return context.skip();
698698
const runner = yield* ProcessRunner.ProcessRunner;
699699
let rows = [
700+
"L'état des connexions TCP",
700701
" TCP 127.0.0.1:43123 0.0.0.0:0 ABHÖREN 4242",
701702
" TCP [::]:43124 [::]:0 LISTENING 4242",
702703
" TCP [::1]:43124 [::]:0 ÉCOUTE 4242",
@@ -712,7 +713,7 @@ effectIt.live(
712713
...input,
713714
args: [
714715
...input.args.slice(0, 3),
715-
`function Get-NetTCPConnection { throw 'CIM must not run' }; function Get-Process { [pscustomobject]@{ Id=4242; ProcessName='node' } }; function netstat.exe { $global:LASTEXITCODE=${exitCode}; '${rows}' -split '\n' }; ${input.args[3]}`,
716+
`function Get-NetTCPConnection { throw 'CIM must not run' }; function Get-Process { [pscustomobject]@{ Id=4242; ProcessName='node' } }; function netstat.exe { $global:LASTEXITCODE=${exitCode}; '${rows.replaceAll("'", "''")}' -split '\n' }; ${input.args[3]}`,
716717
],
717718
}),
718719
(() =>

0 commit comments

Comments
 (0)