Merge pull request #1227 from jp887/fix/coverageTests

Skip version tests when running coverage. Fixes #1226
This commit is contained in:
Ian Gilman 2017-06-22 13:39:24 -07:00 committed by GitHub
commit 3ce663fe54
2 changed files with 14 additions and 7 deletions

View File

@ -10,6 +10,11 @@
<body>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<script>
var isCoverageTest = true;
</script>
<script src="/node_modules/qunitjs/qunit/qunit.js"></script>
<script src="/test/lib/jquery-1.9.1.min.js"></script>
<script src="/test/lib/jquery-ui-1.10.2/js/jquery-ui-1.10.2.min.js"></script>

View File

@ -458,11 +458,13 @@
viewer.open('/test/data/testpattern.dzi');
});
test('version object', function() {
equal(typeof OpenSeadragon.version.versionStr, "string", "versionStr should be a string");
ok(OpenSeadragon.version.major >= 0, "major should be a positive number");
ok(OpenSeadragon.version.minor >= 0, "minor should be a positive number");
ok(OpenSeadragon.version.revision >= 0, "revision should be a positive number");
});
//Version numbers are injected by the build process, so skip version tests if we are only running code coverage
if(!window.isCoverageTest ){
test('version object', function() {
equal(typeof OpenSeadragon.version.versionStr, "string", "versionStr should be a string");
ok(OpenSeadragon.version.major >= 0, "major should be a positive number");
ok(OpenSeadragon.version.minor >= 0, "minor should be a positive number");
ok(OpenSeadragon.version.revision >= 0, "revision should be a positive number");
});
}
})();