working
authorWolfram Schneider <wosch@indexdata.dk>
Fri, 23 Aug 2013 13:52:13 +0000 (15:52 +0200)
committerWolfram Schneider <wosch@indexdata.dk>
Fri, 23 Aug 2013 13:52:13 +0000 (15:52 +0200)
test/spec/mkws-pazpar2.js

index a8bfff4..232e34c 100644 (file)
@@ -67,15 +67,15 @@ describe("Check pazpar2 hit counter", function () {
                     re.exec(found);
                     var hits = -1;
 
-                    if (RegExp.$1 != '') {
+                    if (RegExp.$1) {
                         hits = RegExp.$1;
+                        expect(hits).toBeGreaterThan(0);
                     }
 
                     // debug("found: " + found);
                     if (none) {
                         expect(hits < 0).toBeTruthy();
                     } else {
-                        expect(hits).toBeGreaterThan(0);
                         j_hits = hits;
                     }