18 lines
762 B
Python
18 lines
762 B
Python
"""Optional Node regression checks for asynchronous customer-service drafts."""
|
|
|
|
from pathlib import Path
|
|
import shutil
|
|
import subprocess
|
|
import unittest
|
|
|
|
|
|
class FrontendTests(unittest.TestCase):
|
|
@unittest.skipUnless(shutil.which('node'), 'Node.js is not installed')
|
|
def test_reply_workflows(self):
|
|
root = Path(__file__).resolve().parents[1]
|
|
result = subprocess.run(
|
|
['node', '--test', 'tests/frontend/admin.test.cjs', 'tests/frontend/chat.test.cjs', 'tests/frontend/voice.test.cjs', 'tests/frontend/visitor.test.cjs', 'tests/frontend/drafts.test.cjs'], cwd=root,
|
|
text=True, encoding='utf-8', capture_output=True, timeout=30,
|
|
)
|
|
self.assertEqual(result.returncode, 0, result.stdout + result.stderr)
|