Add tests for new function error messages

No longer use querySelector or querySelectorAll on markup parsed via DOMParser.
Fixed in 0169cb2