Before answering the question some background on moderation to quote from Wikipedia on this topic:
In statistics and regression analysis, moderation occurs when the relationship between two variables depends on a third variable. The third variable is referred to as the moderator variable or simply the moderator.[1] The effect of a moderating variable is characterized statistically as an interaction;[1] that is, a categorical (e.g., sex, ethnicity, class) or quantitative (e.g., level of reward) variable that affects the direction and/or strength of the relation between dependent and independent variables.
Further, in order to answer the question, I invoke the connection between ANOVA and regression analysis (see discussion here). This is also alluded to in the Wikipedia article which cites a regression model with an interaction term:
To quantify the effect of a moderating variable in multiple regression analyses, regressing random variable Y on X, an additional term is added to the model. This term is the interaction between X and the proposed moderating variable.[1]
Thus, for a response Y and two variables x1 and moderating variable x2,:
${ Y=b_{0}+b_{1}x_{1}+b_{2}x_{2}+b_{3}(x_{1}*x_{2})+ \epsilon}$
Note: the interaction term is not a new independent variable! I view it as an augmenting concept to adjust for a deficiency (with respect to fitting the data) from the purely linear additive model specification. Further, the new interaction term is correlated to the main effects terms on which it is based, and as such, can introduce a multicollinearity issue in moderated regression.
To answer the question on how to test for the significance of the interaction term, the classic regression test (see material here) for a regression coefficient will suffice. Absent an interaction term different from zero, we do not have a moderated regression scenario, and related results on the other coefficients will suggest possible main effect variables.