pdf.js/test/unit
Jonas Jenwald 941b65f683 Remove unncessary CanvasFactory/CMapReaderFactory/FileReaderFactory duplication in unit-tests
Given that the API will now, after PR 12039, automatically pick the correct factories to use depending on the environment (browser vs. Node.js), we can utilize that in the unit-tests as well. This way we don't have to manually repeat the same initialization code in *multiple* unit-tests.
*Note:* The *official* PDF.js API is defined in `src/pdf.js`, hence the new exports in `src/display/api.js` will not affect that.

Also, updates the unit-test `FileReaderFactory` helpers similarily.

*Drive-by change:* Fix the `CMapReaderFactory` usage in the annotation unit-tests, since the cache should only contain raw data and not a Promise. While this obviously works as-is, having unit-tests that "abuse" the intended data format can easily lead to unnecessary failures if changes are made to the relevant `src/core/` code.
2021-01-08 17:33:59 +01:00
..
.eslintrc Load the non-test files with standard import statements when running the unit-tests 2020-10-27 11:47:35 +01:00
annotation_spec.js Remove unncessary CanvasFactory/CMapReaderFactory/FileReaderFactory duplication in unit-tests 2021-01-08 17:33:59 +01:00
annotation_storage_spec.js JS -- hidden annotations must be built in case a script show them 2020-11-10 12:48:34 +01:00
api_spec.js Remove unncessary CanvasFactory/CMapReaderFactory/FileReaderFactory duplication in unit-tests 2021-01-08 17:33:59 +01:00
bidi_spec.js Convert var to const/let in the test/unit folder 2020-10-25 15:40:51 +01:00
cff_parser_spec.js Convert var to const/let in the test/unit folder 2020-10-25 15:40:51 +01:00
clitests_helper.js Use the ESLint no-restricted-syntax rule to ensure that assert is always called with two arguments 2020-05-05 13:40:05 +02:00
clitests.json JS -- Add a sandbox based on quickjs 2020-11-19 13:40:46 +01:00
cmap_spec.js Remove unncessary CanvasFactory/CMapReaderFactory/FileReaderFactory duplication in unit-tests 2021-01-08 17:33:59 +01:00
colorspace_spec.js Remove the special handling, used when creating Indexed ColorSpaces, for the case where the lookup-data is a Stream 2020-07-10 17:22:55 +02:00
core_utils_spec.js Parenthesis in names are not escaped when saving 2020-11-25 12:28:12 +01:00
crypto_spec.js Fix var conversions that ESLint could not do automatically 2020-10-25 16:17:12 +01:00
custom_spec.js Remove unncessary CanvasFactory/CMapReaderFactory/FileReaderFactory duplication in unit-tests 2021-01-08 17:33:59 +01:00
display_svg_spec.js Load all unit-tests with native import, rather than SystemJS 2020-10-26 11:11:48 +01:00
display_utils_spec.js Run gulp lint --fix, to account for changes in Prettier version 2.1.x 2020-09-06 12:23:59 +02:00
document_spec.js Don't use 'in' operator to check if key is in a Map 2020-12-16 16:00:12 +01:00
encodings_spec.js Update Prettier to version 2.0 2020-04-14 12:28:14 +02:00
evaluator_spec.js Run gulp lint --fix, to account for changes in Prettier version 2.2.1 2020-11-29 10:01:46 +01:00
fetch_stream_spec.js Update Prettier to version 2.0 2020-04-14 12:28:14 +02:00
function_spec.js Convert var to const/let in the test/unit folder 2020-10-25 15:40:51 +01:00
jasmine-boot.js JS -- Add 'util' object 2020-11-06 18:12:29 +01:00
message_handler_spec.js Update Prettier to version 2.0 2020-04-14 12:28:14 +02:00
metadata_spec.js Move the isEmptyObj helper function from src/shared/util.js to test/unit/test_utils.js 2020-06-09 17:50:16 +02:00
murmurhash3_spec.js Add a MurmurHash3_64.update unit-test for TypedArrays which share the same underlying ArrayBuffer (PR 12534 follow-up) 2020-10-28 12:42:04 +01:00
network_spec.js Fix var conversions that ESLint could not do automatically 2020-10-25 16:17:12 +01:00
network_utils_spec.js Update Prettier to version 2.0 2020-04-14 12:28:14 +02:00
node_stream_spec.js Use the ESLint no-restricted-syntax rule to ensure that assert is always called with two arguments 2020-05-05 13:40:05 +02:00
parser_spec.js Update Prettier to version 2.0 2020-04-14 12:28:14 +02:00
pdf_find_controller_spec.js Run gulp lint --fix, to account for changes in Prettier version 2.2.1 2020-11-29 10:01:46 +01:00
pdf_find_utils_spec.js Run gulp lint --fix, to account for changes in Prettier version 2.1.x 2020-09-06 12:23:59 +02:00
pdf_history_spec.js Update Prettier to version 2.0 2020-04-14 12:28:14 +02:00
primitives_spec.js Add support, in Dict.merge, for merging of "sub"-dictionaries 2020-08-30 23:18:32 +02:00
scripting_spec.js JS -- Actions must be evaluated in global scope 2020-12-17 22:01:45 +01:00
stream_spec.js Convert var to const/let in the test/unit folder 2020-10-25 15:40:51 +01:00
test_utils.js Remove unncessary CanvasFactory/CMapReaderFactory/FileReaderFactory duplication in unit-tests 2021-01-08 17:33:59 +01:00
testreporter.js Import the TestReporter, in the unit and font tests 2020-10-27 11:30:15 +01:00
type1_parser_spec.js Convert var to const/let in the test/unit folder 2020-10-25 15:40:51 +01:00
ui_utils_spec.js Support the once option, when registering EventBus listeners 2020-12-29 16:49:13 +01:00
unicode_spec.js Convert var to const/let in the test/unit folder 2020-10-25 15:40:51 +01:00
unit_test.html Import the TestReporter, in the unit and font tests 2020-10-27 11:30:15 +01:00
util_spec.js Fix encoding issues when printing/saving a form with non-ascii characters 2021-01-05 17:23:18 +01:00
writer_spec.js Dict keys need to be escaped too when saving 2020-09-11 12:25:05 +02:00
xml_spec.js Follow-up of pr #12344 2020-09-09 11:46:02 +02:00