Skip to content

Commit

Permalink
Use cross platform method of running npm
Browse files Browse the repository at this point in the history
Ensure server is terminated on interrupt
  • Loading branch information
mgriffin-scottlogic committed Jun 14, 2024
1 parent 4da9d5f commit 6792b5e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion playwright/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest
import shutil
from xprocess import ProcessStarter

@pytest.fixture(autouse=True, scope="session")
Expand All @@ -8,7 +9,9 @@ class Starter(ProcessStarter):
pattern = "Application bundle generation complete."

# command to start process
args = ['sh', 'npm', 'start']
args = [shutil.which('npm'), 'start']

terminate_on_interrupt = True

# ensure process is running and return its logfile
logfile = xprocess.ensure("estimator", Starter)
Expand Down

0 comments on commit 6792b5e

Please sign in to comment.