It is often stated that
$$\int_{-\infty}^\infty\delta(x) \, {\rm d}x = 1$$
However, the Dirac delta can be defined formally as a distribution
$$\delta: D(\mathbb{R}) \to \mathbb{R}, \qquad \delta(f) = f(0)$$
and in that case, how can we make sense of the integral of the Dirac delta if its domain isn't the set of real numbers?
The notation $\int_{-\infty}^{\infty}\delta_0(x)f(x)\,dx$ means $\delta_0(f)$. The integral is just a suggestive notation since when a distribution is an actual function, it's action is integration. But distributions act on $C_c^{\infty}$, and $1 \notin C_c^{\infty}$, so you have to make sense of $\delta_0(1)$ somehow.
Since $\text{supp}(\delta_0) = \{0\}$ is compact, $\delta_0 \in \mathcal{E}'(\mathbb{R}^n)$, the space of compactly supported distributions. This space can be identified with $C^{\infty}(\mathbb{R}^n)'$, the dual space of $C^{\infty}(\mathbb{R}^n)$, in the following way: If $u \in \mathcal{E}'(\mathbb{R}^n)$ is supported on $K$, then pick $\phi \in C_c^{\infty}(\mathbb{R}^n)$ such that $\phi = 1$ on a neighborhood of $K$ and extend $u$ to act on $\psi \in C^{\infty}(\mathbb{R}^n)$ by $u(\psi) = u(\phi\psi)$. So $\int_{-\infty}^{\infty}\delta_0(x)\,dx = \delta_0(1) = 1$ now makes sense.