diff --git a/test/unit/util_spec.js b/test/unit/util_spec.js index 47b8a037f..87059f89e 100644 --- a/test/unit/util_spec.js +++ b/test/unit/util_spec.js @@ -16,7 +16,7 @@ import { bytesToString, getInheritableProperty, isArrayBuffer, isBool, isEmptyObj, isNum, isSpace, isString, log2, ReadableStream, removeNullCharacters, - stringToBytes, stringToPDFString + stringToBytes, stringToPDFString, URL } from '../../src/shared/util'; import { Dict, Ref } from '../../src/core/primitives'; import { XRefMock } from './test_utils'; @@ -311,4 +311,16 @@ describe('util', function() { expect(typeof readable.getReader).toEqual('function'); }); }); + + describe('URL', function() { + it('should return an Object', function() { + const url = new URL('https://example.com'); + expect(typeof url).toEqual('object'); + }); + + it('should have property `href`', function() { + const url = new URL('https://example.com'); + expect(typeof url.href).toEqual('string'); + }); + }); });