[Pkg-javascript-commits] [pdf.js] 390/414: Move `isDict` unit-tests from util_spec.js to primitives_spec.js
David Prévot
taffit at moszumanska.debian.org
Tue Jun 28 17:12:43 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository pdf.js.
commit b4a17323b6149c7f63b91a1959c8ef973ea2dcc9
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date: Sat Apr 16 20:32:46 2016 +0200
Move `isDict` unit-tests from util_spec.js to primitives_spec.js
This patch moves the unit-test to the correct file, since the `isDict` function was moved PR 6683.
---
test/unit/primitives_spec.js | 16 ++++++++++++++--
test/unit/util_spec.js | 16 +---------------
2 files changed, 15 insertions(+), 17 deletions(-)
diff --git a/test/unit/primitives_spec.js b/test/unit/primitives_spec.js
index d751f3a..a19801f 100644
--- a/test/unit/primitives_spec.js
+++ b/test/unit/primitives_spec.js
@@ -1,10 +1,9 @@
/* globals expect, it, describe, beforeEach, Name, Dict, Ref, RefSet, Cmd,
- jasmine */
+ jasmine, isDict */
'use strict';
describe('primitives', function() {
-
describe('Name', function() {
it('should retain the given name', function() {
var givenName = 'Font';
@@ -146,4 +145,17 @@ describe('primitives', function() {
expect(refset.has(anotherRef)).toBeFalsy();
});
});
+
+ describe('isDict', function() {
+ it('handles empty dictionaries with type check', function() {
+ var dict = new Dict();
+ expect(isDict(dict, 'Page')).toEqual(false);
+ });
+
+ it('handles dictionaries with type check', function() {
+ var dict = new Dict();
+ dict.set('Type', Name.get('Page'));
+ expect(isDict(dict, 'Page')).toEqual(true);
+ });
+ });
});
diff --git a/test/unit/util_spec.js b/test/unit/util_spec.js
index 5fa33f9..655e2dc 100644
--- a/test/unit/util_spec.js
+++ b/test/unit/util_spec.js
@@ -1,22 +1,8 @@
-/* globals expect, it, describe, Dict, isDict, Name, PDFJS,
- stringToPDFString, removeNullCharacters */
+/* globals describe, it, expect, stringToPDFString, removeNullCharacters */
'use strict';
describe('util', function() {
- describe('isDict', function() {
- it('handles empty dictionaries with type check', function() {
- var dict = new Dict();
- expect(isDict(dict, 'Page')).toEqual(false);
- });
-
- it('handles dictionaries with type check', function() {
- var dict = new Dict();
- dict.set('Type', Name.get('Page'));
- expect(isDict(dict, 'Page')).toEqual(true);
- });
- });
-
describe('stringToPDFString', function() {
it('handles ISO Latin 1 strings', function() {
var str = '\x8Dstring\x8E';
--
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