mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Add more unit tests for the API
This commit is contained in:
parent
c0419d7dea
commit
a984fe5b55
2 changed files with 19 additions and 1 deletions
|
@ -69,6 +69,18 @@ describe('api', function() {
|
|||
0, 841.89, null] });
|
||||
});
|
||||
});
|
||||
it('gets attachments', function() {
|
||||
var promise = doc.getAttachments();
|
||||
waitsForPromise(promise, function (data) {
|
||||
expect(data).toEqual(null);
|
||||
});
|
||||
});
|
||||
it('gets javascript', function() {
|
||||
var promise = doc.getJavaScript();
|
||||
waitsForPromise(promise, function (data) {
|
||||
expect(data).toEqual([]);
|
||||
});
|
||||
});
|
||||
it('gets outline', function() {
|
||||
var promise = doc.getOutline();
|
||||
waitsForPromise(promise, function(outline) {
|
||||
|
@ -93,6 +105,12 @@ describe('api', function() {
|
|||
expect(true).toEqual(true);
|
||||
});
|
||||
});
|
||||
it('gets filesize in bytes', function() {
|
||||
var promise = doc.getDownloadInfo();
|
||||
waitsForPromise(promise, function (data) {
|
||||
expect(data.length).toEqual(105779);
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('Page', function() {
|
||||
var resolvePromise;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue