A chi-square-type test for covariances