18 lines
600 B
Python
18 lines
600 B
Python
from pathlib import Path
|
|||
|
|
import unittest
|
||
|
|
|
||
|
|
|
||
|
|
ROOT = Path(__file__).parents[2]
|
||
|
|
|
||
|
|
|
||
|
|
class MatchmakerServiceCardContractTest(unittest.TestCase):
|
||
|
|
def test_store_normalizes_api_entity_fields_for_card_navigation(self):
|
||
|
|
source = (ROOT / "miniapp/stores/matchmakerStore.js").read_text(encoding="utf-8")
|
||
|
|
self.assertIn("serviceId: service.serviceId || service.id", source)
|
||
|
|
self.assertIn("requirement: service.requirement || service.description || ''", source)
|
||
|
|
self.assertIn(".map((item) => this.normalizeService(item))", source)
|
||
|
|
|
||
|
|
|
||
|
|
if __name__ == "__main__":
|
||
|
|
unittest.main()
|