[Pkg-javascript-commits] [pdf.js] 23/204: Add getStats unit test
David Prévot
taffit at moszumanska.debian.org
Sat Oct 25 18:50:26 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository pdf.js.
commit fb7489ffd0ac3d0b70ead24b6ed197e44bb22d58
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date: Sat Aug 30 22:12:34 2014 +0200
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.
---
test/unit/api_spec.js | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/test/unit/api_spec.js b/test/unit/api_spec.js
index 3019b26..f82e960 100644
--- a/test/unit/api_spec.js
+++ b/test/unit/api_spec.js
@@ -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;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git
More information about the Pkg-javascript-commits
mailing list