In the Wikidata Query UI, we want to test the `CodeSamples` API, which requires loading files with the expected results from disk. Since Chromium doesn’t allow cross-origin requests on the `file://` protocol, we disable those tests in browsers:
```lang=js
if ( navigator.userAgent.indexOf( 'PhantomJS' ) === -1 ) {
// cannot load code examples in browser
assert.expect( 0 );
return;
}
```
However, since T209206, `grunt qunit` is now backed by a browser as well, which means those tests are effectively never run. We should find some way to fix this.
---
Current status: you can now run the tests in the browser by serving them via HTTP: run `npm start` in the WDQS-GUI repository and then open http://127.0.0.1:8080/wikibase/tests/ in your browser. However, we still need more work to be able to run the tests in CI.