Add tests for new function error messages

No longer use querySelector or querySelectorAll on markup parsed via DOMParser.
maybe fix this === while you in here :)