Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Sinjhin/8fbe187811e0a15ed1a9e8f2df750afa to your computer and use it in GitHub Desktop.
Save Sinjhin/8fbe187811e0a15ed1a9e8f2df750afa to your computer and use it in GitHub Desktop.
<script src="../node_modules/steal/steal.js">
window.rerun = true;
function rerunIfSuccessful() {
var result = document.getElementById('qunit-testresult');
var failed = result.getElementsByClassName('failed');
if (!failed.length) {
setTimeout(rerunIfSuccessful, 4000);
} else if (failed[0].innerHTML === "0" && window.rerun) {
location.reload(true);
}
}
setTimeout(rerunIfSuccessful, 4000);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment