Size: 559 bytes.


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env python3
# cs/labs/javascript/hello_world_test.gpt.py
# cs/labs/javascript/hello_world_test.py
import subprocess
from pathlib import Path


def main() -> None:
    root = Path(__file__).resolve().parent
    script = root / "hello_world.gpt.js"
    result = subprocess.run(
        ["node", str(script)],
        check=True,
        capture_output=True,
        text=True,
    )
    output = result.stdout.strip()
    if output != "Hello World!":
        raise SystemExit(f"unexpected output: '{output}'")


if __name__ == "__main__":
    main()
v0 (commit) © 2025 @p13i.io | Load balancer proxied to: cs-code-viewer-1:8080 in 1ms.