From 191cf81d6b8f81c6f45e295c67f8cd9e0bad56dc Mon Sep 17 00:00:00 2001 From: John Perdue Date: Tue, 20 Jun 2017 22:30:58 +0100 Subject: [PATCH] Skip version tests when running coverage. --- test/coverage.html | 5 +++++ test/modules/basic.js | 16 +++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/test/coverage.html b/test/coverage.html index 7fda4329..36e2e056 100644 --- a/test/coverage.html +++ b/test/coverage.html @@ -10,6 +10,11 @@
+ + + diff --git a/test/modules/basic.js b/test/modules/basic.js index 1e630f9b..4cecce2a 100644 --- a/test/modules/basic.js +++ b/test/modules/basic.js @@ -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"); + }); + } })();