Backend and frontend testing stacks (pytest + vitest) and a few initial tests.

This commit is contained in:
2026-02-27 16:03:06 +03:00
parent 46af911a06
commit be2590d7f7
10 changed files with 104 additions and 2 deletions
+21
View File
@@ -0,0 +1,21 @@
import pytest
from apps.accounts.services.phone import normalize_phone_number
@pytest.mark.parametrize(
"raw,expected",
[
("+966512345678", "+966512345678"),
("0512345678", "+966512345678"),
("512345678", "+966512345678"),
("00966512345678", "+966512345678"),
],
)
def test_normalize_phone_number_valid(raw, expected):
assert normalize_phone_number(raw) == expected
def test_normalize_phone_number_invalid():
with pytest.raises(ValueError):
normalize_phone_number("12345")