projects
/
mkws-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
558e6fc
)
check the jasmine config for valid values
author
Wolfram Schneider
<wosch@indexdata.dk>
Wed, 22 Jan 2014 12:56:24 +0000
(12:56 +0000)
committer
Wolfram Schneider
<wosch@indexdata.dk>
Wed, 22 Jan 2014 12:56:24 +0000
(12:56 +0000)
test/spec/mkws-pazpar2.js
patch
|
blob
|
history
diff --git
a/test/spec/mkws-pazpar2.js
b/test/spec/mkws-pazpar2.js
index
66b0557
..
b90b42d
100644
(file)
--- a/
test/spec/mkws-pazpar2.js
+++ b/
test/spec/mkws-pazpar2.js
@@
-9,7
+9,7
@@
var debug = function (text) {
mkws.debug_function(text)
}
mkws.debug_function(text)
}
-// Define empty mkws_config for simple applications that don't define it.
+ // Define empty mkws_config for simple applications that don't define it.
if (jasmine_config == null || typeof jasmine_config != 'object') {
var jasmine_config = {};
}
if (jasmine_config == null || typeof jasmine_config != 'object') {
var jasmine_config = {};
}
@@
-20,7
+20,7
@@
if (jasmine_config == null || typeof jasmine_config != 'object') {
* object: jasmine_config = {};
*
*/
* object: jasmine_config = {};
*
*/
-beforeEach(function () {
+function init_jasmine_config() {
var jasmine_config_default = {
search_query: "freebsd",
var jasmine_config_default = {
search_query: "freebsd",
@@
-40,9
+40,9
@@
beforeEach(function () {
if (!jasmine_config.hasOwnProperty(key)) {
jasmine_config[key] = jasmine_config_default[key];
}
if (!jasmine_config.hasOwnProperty(key)) {
jasmine_config[key] = jasmine_config_default[key];
}
- debug("jasmine config: " + key + " => " + jasmine_config[key]);
+ debug("jasmine config: " + key + " => " + jasmine_config[key]);
}
}
-});
+}
var get_hit_counter = function () {
// not yet here
var get_hit_counter = function () {
// not yet here
@@
-62,6
+62,17
@@
var get_hit_counter = function () {
return hits;
}
return hits;
}
+describe("Init jasmine config", function () {
+ it("jasmine was successfully initialized", function () {
+ init_jasmine_config();
+
+ expect(jasmine_config.search_query).toMatch(/\w/);
+ expect(jasmine_config.second).toBeGreaterThan(100);
+ expect(jasmine_config.max_time).toBeGreaterThan(1);
+ expect(jasmine_config.expected_hits).toBeGreaterThan(1);
+ });
+});
+
describe("Check pazpar2 search", function () {
it("pazpar2 was successfully initialize", function () {
expect(mkws_config.error).toBe(undefined);
describe("Check pazpar2 search", function () {
it("pazpar2 was successfully initialize", function () {
expect(mkws_config.error).toBe(undefined);