mirror of
https://github.com/kiwix/kiwix-js.git
synced 2025-09-24 04:54:51 -04:00
Tests.
This commit is contained in:
parent
b679948db9
commit
79dbcbf3b1
@ -532,5 +532,19 @@ define(['jquery', 'title', 'archive', 'zimArchive', 'zimDirEntry', 'util', 'geom
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
asyncTest("Image 's/style.css' can be loaded", function() {
|
||||||
|
expect(4);
|
||||||
|
localZimArchive.getTitleByName("-/s/style.css").then(function(title) {
|
||||||
|
ok(title !== null, "Title found");
|
||||||
|
equal(title.url, "-/s/style.css", "URL is correct.");
|
||||||
|
localZimArchive.readBinaryFile(title, function(title, data) {
|
||||||
|
equal(data.length, 104495, "Data length is correct.");
|
||||||
|
data = utf8.parse(data);
|
||||||
|
var beginning = "\n/* start http://en.wikipedia.org/w/load.php?debug=false&lang=en&modules=site&only=styles&skin=vector";
|
||||||
|
equal(data.slice(0, beginning.length), beginning, "Content starts correctly.");
|
||||||
|
start();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user