Merge pull request #5248 from Snuffleupagus/getStats-unit-test
Add getStats unit test
This commit is contained in:
commit
1d9dc37337
@ -1,6 +1,7 @@
|
||||
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
||||
/* globals PDFJS, expect, it, describe, Promise, combineUrl, waitsFor */
|
||||
/* globals PDFJS, expect, it, describe, Promise, combineUrl, waitsFor,
|
||||
isArray */
|
||||
|
||||
'use strict';
|
||||
|
||||
@ -141,6 +142,13 @@ describe('api', function() {
|
||||
expect(data.length).toEqual(105779);
|
||||
});
|
||||
});
|
||||
it('gets stats', function() {
|
||||
var promise = doc.getStats();
|
||||
waitsForPromise(promise, function (stats) {
|
||||
expect(isArray(stats.streamTypes)).toEqual(true);
|
||||
expect(isArray(stats.fontTypes)).toEqual(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('Page', function() {
|
||||
var resolvePromise;
|
||||
|
Loading…
x
Reference in New Issue
Block a user