Add tests for DOM functions
Created by: felixfbecker
The DOM functions are currently untested, which makes it hard to refactor, optimize (e.g. #3284 (closed)) or fix bugs in them, because there are a lot of cases (GH, GHE) x (Refined GitHub, Vanilla) x (Split, Unified).
We need to add unit tests with fixtures for them.