Skip to content

Instantly share code, notes, and snippets.

@phillipskevin
Last active July 30, 2018 18:25
Show Gist options
  • Save phillipskevin/77ab3cd86af5fe64a83640743d6be864 to your computer and use it in GitHub Desktop.
Save phillipskevin/77ab3cd86af5fe64a83640743d6be864 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