mirror of
https://github.com/kiwix/kiwix-js.git
synced 2025-09-22 12:01:15 -04:00
Add a unit test for the "random article" feature. Fixes #70
This commit is contained in:
parent
bd2a224a96
commit
0a1c5ecdeb
@ -315,5 +315,16 @@ define(function(require) {
|
||||
var rectFranceGermany = new geometry.rect(0,40,10,10);
|
||||
localArchive.getTitlesInCoords(rectFranceGermany, 10, callbackTitlesNearbyFound);
|
||||
});
|
||||
|
||||
module("random_title");
|
||||
asyncTest("check that a random title is found", function() {
|
||||
var callbackRandomTitleFound = function(title) {
|
||||
ok(title !== null, "One title should be found");
|
||||
ok(title.name !== null, "The random title should have a name" );
|
||||
|
||||
start();
|
||||
};
|
||||
localArchive.getRandomTitle(callbackRandomTitleFound);
|
||||
});
|
||||
};
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user