Skip version tests when running coverage.

This commit is contained in:
John Perdue 2017-06-20 22:30:58 +01:00
parent 4808d7f54d
commit 191cf81d6b
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');
});
//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");
});
}
})();