My friend told me to use Levene's test to check the assumption of homoskedasticity before applying the two sample t-test. I think most people that use linear models don't do that. They check the residual plot to eye ball it instead, and it would be enough. If you look at a two sample t-test as a kind of linear model then you would not check for homoskedasticity by Levene's test.
Why do we need to check only before a t-test or Anova?
I appreciate advice with theoretical reasons.