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.
This commit is contained in:
parent
4523ae0b91
commit
b4a17323b6
@ -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);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user