Studying some properties of Dirac's delta distribution $\delta$ in $n$ dimensions, I found that under a coordinate transformation $\mathbf{x}\mapsto \mathbf{y}(\mathbf{x})$, an integral involving $\delta(\mathbf{x})$ is equivalent to the integral in the transformed coordinates involving $|\det\partial_{\mathbf{x}}\mathbf{y}|\delta(\mathbf{y})$, where $\partial_{\mathbf{x}}\mathbf{y}$ is the Jabocian of $\mathbf{y}$ at $\mathbf{x}$. Specifically, the following formula is present in the book I'm reading.
$$\delta(\mathbf{x})=\frac{\delta(\mathbf{y})}{|\det\partial_{\mathbf{x}}\mathbf{y}|}$$
However this doens't make much sense to me, for I can't imagine how a change of coordinates is performed only by looking at the integrand. Formally, (tell me if I'm wrong) for a test function $f$ and a diffeomorphism $\mathbf{y}$ such that $\mathbf{y}(K) = \mathbb{R}^n$one would have that
$$\int_{\mathbb{R}^n} \delta(\mathbf{x})f(\mathbf{x}) d\mathbf{x} =\int_{\mathbb{y}(K)} \delta(\mathbf{x})f(\mathbf{x}) d\mathbf{x} = \int_{K} \delta(\mathbf{y}(\mathbf{x}))f(\mathbf{y}(\mathbf{x})) |\det\partial_{\mathbf{x}}\mathbf{y}|d\mathbf{y}$$
I don't know, however, how does this lead to the result, or if this is valid at all since the change of variables through the jacobian is perhaps not applicable to the given case.
My question is therefore how do we prove the initial statement without falling in the sloppy reasonings I've seen around, unfortunately usual among physicits, employing for example indefinite integrals---because, to start with, I don't understand how one can perform a change of coordinates without taking into account the domain of integration---.
All related answers I've seen in stackexchange didn't really helped me, either because they were written without really going into the mathematics behind it, or because they treated specifically a situation I could not generalise to my question.