from fmatch.saas.operators.fix_phone_format import fix_phone_format


def test_us_phone_basic():
    assert fix_phone_format("(415) 555-1212", country="US")["value"] == "+14155551212"
    assert fix_phone_format("(415) 555-1212 x123", country="US")["value"] == "+14155551212"
    assert fix_phone_format("123", country="US")["value"] == ""

