def METHOD_NAME(jsx_enabled):
    buf = BytesIO(JSX_SOURCE)
    messages = [m[2] for m in extract.extract_javascript(buf, ('_', 'gettext'), [], {"jsx": jsx_enabled})]
    if jsx_enabled:
        assert messages == EXPECTED_JSX_MESSAGES
    else:
        assert messages != EXPECTED_JSX_MESSAGES