Add querySelector test, addresses #1194

Wasn't sure whether document should be an injected dependency, but the convention seems to be to assume it's a global, so have followed that.