Skip to content

Commit

Permalink
Add a toggle for hidding skipped tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chancancode committed Jan 28, 2016
1 parent 319ff61 commit cc15887
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion testem.dist.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"framework": "qunit",
"test_page": "dist/tests/index.html?hidepassed",
"test_page": "dist/tests/index.html?hidepassed&hideskipped",
"timeout": 540,
"parallel": 4,
"disable_watching": true,
Expand Down
13 changes: 13 additions & 0 deletions tests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
<meta charset="utf-8">
<title>Ember</title>
<link rel="stylesheet" href="../qunit/qunit.css">
<style type="text/css">
#qunit-tests.hideskipped li.skipped {
display: none;
}
</style>
<script src="../qunit/qunit.js"></script>
<script src="/testem.js"></script>

Expand Down Expand Up @@ -142,6 +147,8 @@

// Tests should time out after 15 seconds
QUnit.config.testTimeout = 15000;
// Hide skipped tests
QUnit.config.urlConfig.push({ id: 'hideskipped', label: "Hide skipped tests"});
// Handle testing feature flags
QUnit.config.urlConfig.push({ id: 'enableoptionalfeatures', label: "Enable Opt Features"});
// Handle extending prototypes
Expand All @@ -151,6 +158,12 @@
// Handle JSHint
QUnit.config.urlConfig.push('nojshint');
QUnit.config.urlConfig.push('forceskip');

QUnit.begin(function() {
if (QUnit.urlParams.hideskipped) {
$('#qunit-tests').addClass('hideskipped');
}
});
})();
</script>

Expand Down

0 comments on commit cc15887

Please sign in to comment.