Bickel and Rosenblatt proposed a procedure for testing the goodness of fit of a specified density to observed data. The test statistic is based on the distance between the kernel density estimate and the hypothesized density, and it depends on a kernel $K$, a bandwidth $b_n$ and an arbitrary weight function $a$. We study the behavior of the asymptotic power of the test and show that a uniform kernel maximizes the power when $a > 0$.
"The Power and Optimal Kernel of the Bickel-Rosenblatt Test for Goodness of Fit." Ann. Statist. 19 (2) 999 - 1009, June, 1991. https://doi.org/10.1214/aos/1176348133