diff --git a/test/unit/primitives_spec.js b/test/unit/primitives_spec.js index d751f3a0f..a19801feb 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 5fa33f9f5..655e2dc18 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';