At first Jesus ignored the woman from Canaan whose daughter had a devil.
She wasn't a Jew. Jesus said to His disciples, "I'm not sent to help her. I'm sent to the lost sheep of Israel." He wanted to see her faith.
Jesus knew if the woman had faith, she could get results even without a covenant with God. She did have real faith and her daughter was made whole.