mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Add getStats unit test
Since some Telemetry data depends on `getStats`, having a unit test should make it more diffucult to accidentally break this without noticing.
This commit is contained in:
parent
8042a4b783
commit
fb7489ffd0
1 changed files with 9 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue