@@ -295,9 +295,17 @@ def test_json_document_redacts_provider_keys_and_validates_before_save(
295295 )
296296
297297
298+ @pytest .mark .parametrize (
299+ "launch" ,
300+ (
301+ ["bash" , "start.sh" ],
302+ ["env" , "BROWSER_IDLE_TIMEOUT_MS=0" , "bash" , "start.sh" ],
303+ ),
304+ )
298305def test_javascript_start_plan_requires_sandwich_and_uses_fixed_tmux (
299306 monkeypatch : pytest .MonkeyPatch ,
300307 tmp_path : Path ,
308+ launch : list [str ],
301309) -> None :
302310 runtime = tmp_path / "browser"
303311 runtime .mkdir ()
@@ -307,7 +315,7 @@ def test_javascript_start_plan_requires_sandwich_and_uses_fixed_tmux(
307315 "category" : "javascript" ,
308316 "root" : runtime ,
309317 "documents" : (),
310- "launch" : [ "bash" , "start.sh" ] ,
318+ "launch" : launch ,
311319 "tmux_session" : "ulysses-example-browser" ,
312320 "ports" : [],
313321 }
@@ -334,7 +342,23 @@ def test_javascript_start_plan_requires_sandwich_and_uses_fixed_tmux(
334342 "-c" ,
335343 str (runtime ),
336344 ]
337- assert plan ["steps" ][0 ]["argv" ][- 2 :] == ["bash" , "start.sh" ]
345+ assert plan ["steps" ][0 ]["argv" ][- len (launch ) :] == launch
346+
347+
348+ def test_javascript_start_plan_rejects_env_options_before_fixed_wrapper (
349+ tmp_path : Path ,
350+ ) -> None :
351+ with pytest .raises (
352+ manager .RuntimeJobError ,
353+ match = "must launch the project-local start.sh" ,
354+ ):
355+ manager ._managed_tmux_start_steps (
356+ {"id" : "example.browser" , "ports" : []},
357+ session = "ulysses-example-browser" ,
358+ root = tmp_path ,
359+ launch = ["env" , "--ignore-environment" , "bash" , "start.sh" ],
360+ label = "Start managed tmux runtime" ,
361+ )
338362
339363
340364def test_open_and_initialize_actions_use_project_root (
0 commit comments