pdf.js/test/unit
Jonas Jenwald 0276385e6e [api-minor] Fix completely broken getStats method by returning stats in Objects, rather than in Arrays (PR 11029 follow-up)
With the changes to the `StreamType`/`FontType` "enums" in PR 11029, one unfortunate result is that `getStats` now *always* returns empty Arrays. Something that everyone, myself included, apparently missed is that you obviously cannot index an Array with Strings :-)

I wrongly assumed that the unit-tests would catch any bugs, but they apparently suffered from the same issue as the code in `src/core/`.

Another possible option could perhaps be to use `Set`s, rather than objects, but that will require larger changes since `LoopbackPort` (in `src/display/api.js`) doesn't support them.
2019-08-02 14:09:24 +02:00
..
annotation_spec.js Annotations - Implement parsing of IRT, RT, State and StateModel 2019-07-16 23:33:07 +02:00
api_spec.js [api-minor] Fix completely broken getStats method by returning stats in Objects, rather than in Arrays (PR 11029 follow-up) 2019-08-02 14:09:24 +02:00
bidi_spec.js Convert the files in the /test/unit folder to ES6 modules 2017-04-30 00:34:02 +02:00
cff_parser_spec.js Add unique glyph names for CFF fonts. 2019-02-27 15:00:29 -08:00
clitests_helper.js Reduce the amount of console "spam", by ignoring info/warn calls, when running the unit-tests in Node.js/Travis 2018-06-03 00:28:40 +02:00
clitests.json Run the custom_spec unit-tests in Node.js/Travis (PR 10537 follow-up) 2019-02-26 22:40:55 +01:00
cmap_spec.js Rename the src/display/dom_utils.js file to src/display/display_utils.js 2019-02-23 16:30:16 +01:00
colorspace_spec.js Add caching to reduce the number of Ref objects 2019-05-26 12:23:37 +02:00
core_utils_spec.js Add caching to reduce the number of Ref objects 2019-05-26 12:23:37 +02:00
crypto_spec.js Convert the files in the /test/unit folder to ES6 modules 2017-04-30 00:34:02 +02:00
custom_spec.js Rename the src/display/dom_utils.js file to src/display/display_utils.js 2019-02-23 16:30:16 +01:00
display_svg_spec.js Restore the btoa/atob polyfills for Node.js 2018-01-13 01:31:05 +01:00
display_utils_spec.js Implement creation/modification date for annotations 2019-05-05 14:51:03 +02:00
document_spec.js Add a getDocId method to the idFactory, in Page instances, to avoid passing around PDFManager instances unnecessarily (PR 7941 follow-up) 2019-04-20 13:11:17 +02:00
encodings_spec.js Implement unit tests for the encodings and fix missing items 2017-12-24 18:14:40 +01:00
evaluator_spec.js Add a getDocId method to the idFactory, in Page instances, to avoid passing around PDFManager instances unnecessarily (PR 7941 follow-up) 2019-04-20 13:11:17 +02:00
fetch_stream_spec.js Ensure that ReadableStreams are cancelled with actual Errors 2019-08-01 16:40:46 +02:00
function_spec.js Update the ESLint dependencies, and also tweak the no-multiple-empty-lines rules 2018-01-03 13:32:57 +01:00
jasmine-boot.js Add fetch stream spec 2019-04-07 13:14:03 +02:00
message_handler_spec.js Ensure that ReadableStreams are cancelled with actual Errors 2019-08-01 16:40:46 +02:00
metadata_spec.js Implement a unit test for metadata parsing to ensure that it's not vulnerable to the billion laughs attack 2019-01-19 19:54:08 +01:00
murmurhash3_spec.js Convert the files in the /test/unit folder to ES6 modules 2017-04-30 00:34:02 +02:00
network_spec.js Ensure that ReadableStreams are cancelled with actual Errors 2019-08-01 16:40:46 +02:00
network_utils_spec.js decode filename when match an urlencode filename from contentDispositionFilename 2019-07-31 09:33:56 +08:00
node_stream_spec.js Ensure that ReadableStreams are cancelled with actual Errors 2019-08-01 16:40:46 +02:00
parser_spec.js Change the signature of the Parser constructor to take a parameter object 2019-06-23 16:01:45 +02:00
pdf_find_controller_spec.js Remove left-over console log from the find controller unit tests 2019-01-12 22:27:40 +01:00
pdf_find_utils_spec.js Add initial support for "Whole words" searching in the viewer 2018-09-10 11:59:29 +02:00
pdf_history_spec.js Fix a PDFHistory regression with document hashes of the nameddest=... form 2017-10-09 21:58:54 +02:00
primitives_spec.js Add caching to reduce the number of Ref objects 2019-05-26 12:23:37 +02:00
stream_spec.js Make the getBytes/peekBytes methods of Stream/DecodeStream/ChunkedStream able to return Uint8ClampedArrays 2018-06-12 11:01:32 +02:00
test_utils.js Add a getDocId method to the idFactory, in Page instances, to avoid passing around PDFManager instances unnecessarily (PR 7941 follow-up) 2019-04-20 13:11:17 +02:00
testreporter.js Reword test reporter message 2018-08-05 21:21:46 +02:00
type1_parser_spec.js Fix inconsistent spacing and trailing commas in objects in test/ files, so we can enable the comma-dangle and object-curly-spacing ESLint rules later on 2017-06-02 13:04:04 +02:00
ui_utils_spec.js Convert some usage of indexOf to startsWith/includes where applicable 2019-01-18 17:57:41 +01:00
unicode_spec.js Convert the files in the /test/unit folder to ES6 modules 2017-04-30 00:34:02 +02:00
unit_test.html Replaces RequireJS to SystemJS. 2017-02-27 08:32:39 -06:00
util_spec.js Move worker-thread only functions from src/shared/util.js and into a new src/core/core_utils.js file 2019-02-24 00:35:39 +01:00