Add test for chi2 panic