[Pkg-javascript-commits] [pdf.js] 39/174: Slightly improved `getPage` unit-tests
David Prévot
taffit at moszumanska.debian.org
Thu Nov 19 18:45:06 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository pdf.js.
commit ae255f8921f26356e57f96c9aca492ec8c3457a4
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date: Sun Oct 4 14:28:24 2015 +0200
Slightly improved `getPage` unit-tests
---
test/unit/api_spec.js | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/test/unit/api_spec.js b/test/unit/api_spec.js
index 4747342..2668368 100644
--- a/test/unit/api_spec.js
+++ b/test/unit/api_spec.js
@@ -1,7 +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,
- MissingPDFException, StreamType, FontType */
+ MissingPDFException, StreamType, FontType, PDFPageProxy */
'use strict';
@@ -104,7 +104,14 @@ describe('api', function() {
it('gets page', function() {
var promise = doc.getPage(1);
waitsForPromiseResolved(promise, function(data) {
- expect(true).toEqual(true);
+ expect(data instanceof PDFPageProxy).toEqual(true);
+ expect(data.pageIndex).toEqual(0);
+ });
+ });
+ it('gets non-existent page', function() {
+ var promise = doc.getPage(100);
+ waitsForPromiseRejected(promise, function(data) {
+ expect(data instanceof Error).toEqual(true);
});
});
it('gets page index', function() {
--
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