From ed3713eb14d17c063d5153c20bab04debeb427f2 Mon Sep 17 00:00:00 2001 From: Wolfram Schneider Date: Fri, 23 Aug 2013 15:53:14 +0200 Subject: [PATCH] cleanup --- test/spec/mkws-pazpar2.js | 52 ++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/test/spec/mkws-pazpar2.js b/test/spec/mkws-pazpar2.js index 232e34c..38aec0e 100644 --- a/test/spec/mkws-pazpar2.js +++ b/test/spec/mkws-pazpar2.js @@ -58,33 +58,31 @@ describe("Check pazpar2 hit counter", function () { var j_hits = 0; function found(time, none) { - describe("found hits", function () { - setTimeout(function () { - j_time = time; - - var found = $("#mkwsPager").text(); - var re = /found: ([0-9]+)/; - re.exec(found); - var hits = -1; - - if (RegExp.$1) { - hits = RegExp.$1; - expect(hits).toBeGreaterThan(0); - } - - // debug("found: " + found); - if (none) { - expect(hits < 0).toBeTruthy(); - } else { - j_hits = hits; - } - - debug("mkws pager found records: '" + hits + "'"); - debug("time state: " + j_time); - - expect(time >= 0).toBeTruthy(); - }, time * 1000); - }); + setTimeout(function () { + j_time = time; + + var found = $("#mkwsPager").text(); + var re = /found: ([0-9]+)/; + re.exec(found); + var hits = -1; + + if (RegExp.$1) { + hits = RegExp.$1; + expect(hits).toBeGreaterThan(0); + } + + // debug("found: " + found); + if (none) { + expect(hits < 0).toBeTruthy(); + } else { + j_hits = hits; + } + + debug("mkws pager found records: '" + hits + "'"); + debug("time state: " + j_time); + + expect(time >= 0).toBeTruthy(); + }, time * 1000); } runs(function () { -- 1.7.10.4