The term 'chi-squared test' tends to be applied to almost any test that has a test statistic whose distribution under $H_0$ is (at least approximately) distributed as chi-squared. Something similar happens with the term 'z-test'.
There are perhaps dozens of different tests with this property.
The chi-squared distribution occurs when you sum squares of independent standard normal random variables.
More generally (to get mildly technical - while dodging still further technicalities), the chi-squared distribution arises from the quadratic term in the exponent of a multivariate normal. That is, if $\underline{X}\sim N_p(\underline{\mu},\Sigma)$ then $(\underline{x}-\underline{\mu})^\top \Sigma^{-1}(\underline{x}-\underline{\mu})$ has a $\chi^2_p$ distribution, and if there are linear restrictions on the $\underline{X}$ the chi-squared distribution will lose 1 degree of freedom for each such restriction.
The chi-squared tests you mention (goodness of fit and test of independence) are based on a (degenerate) multivariate normal approximation to a multinomial distribution of counts, given marginal total(s), in just this sense.
There are a variety of other tests that use chi-squared distributions for the test statistic under $H_0$, many involving continuous models. Here's a few examples of ways that chi-squared tests may arise:
the distribution of sample variance under simple random sampling of a normal population is a (scaled) chi-squared. So a one-sample variance test may be a chi-squared test.
the distribution of sums of squares of residuals from a (correct) Gaussian model with known $\sigma$ is a multiple of a chi-squared.
the distribution of minus twice the log of the likelihood ratio in a likelihood ratio test is asymptotically chi-squared (Wilks' theorem) -- indeed there are a number of tests of nested models that result in chi-squared distributions (for some models these will be exact, for others asymptotic); this includes Wald tests and Lagrange multiplier (/score) tests.
The case you mention doesn't specify whether we're dealing with an assumption of normality or not. It might be an 'exact' small sample test or it might be an asymptotic test.