TikTok has filed a federal lawsuit challenging a law that would ban the app if its Chinese parent-company does not sell the social media platform.