"""Exercise the production preference bootstrap across separate web origins.""" import shutil import subprocess import unittest from pathlib import Path @unittest.skipUnless(shutil.which('node'), 'Node exercises the shared page behavior') class ClientPreferences(unittest.TestCase): def test_behavior(self): root = Path(__file__).resolve().parents[1] result = subprocess.run(['node', '--test', str(root / 'tests/client_preferences.cjs')], capture_output=True, text=True) self.assertEqual(result.returncode, 0, result.stdout + result.stderr)