This is how God measures us. "But the Lord said to Samuel, “Do not look at his appearance or at the height of his stature, because I have rejected him; for God sees not as man sees, for man looks at the outward appearance, but the LORD looks at the heart.” 1 Samuel 16:7
"And God, who knows the heart, testified to them giving them the Holy Spirit, just as He also did to us..." Acts 15:8
"but just as we have been approved by God to be entrusted with the gospel, so we speak, not as pleasing men, but God, who examines our hearts." 1 Thes 2:4
Indeed when we decide whether to friend another and keep their company, if they are a believer, they must exhibit the fruits of the Holy Spirit.
If the Holy Spirit lives within them, they will exhibit these characteristics..."But the fruit of the Spirit is love, joy, peace, patience, kindness, goodness, faithfulness, gentleness, and self-control." Galatians 5:22-23
Is the Holy Spirit doing it's work in them? Is it transforming them to become more Christ-like every day? If not, then they are not walking in the faith.