Use javascript to check the test flag

This is due to dependency order: this cannot be done in clojurescript,
because the code needing the javascript-libraries is loaded before
the check logic. Another way to fix this would be to create all tests
conditionally, and expose them in runner, but this is a bit too large
change for now.