1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

Implement a basic unit test for the find controller

This commit shows that we can now unit test the find controller and
that executing regular queries works. Note that this is only a first
step and not a complete suite of unit tests for all possible options
of the find controller.

While writing this unit test, I found two smaller issues that I
addressed directly. The first one is that in the previous find
controller refactoring I forgot to rename some occurrences of a now
private member variable. Fortunately this did not cause any bugs since
we did have a public getter and the fetched value may be changed by
reference, but it's nevertheless good to fix. The second issue is that
some entries in the `test/unit/clitests.json` file were not correct,
resulting in these tests not being executed on e.g., Travis CI.
This commit is contained in:
Tim van der Meij 2018-09-21 22:40:15 +02:00
parent f79fb88864
commit 1b402996cf
No known key found for this signature in database
GPG key ID: 8C3FD2925A5F2762
4 changed files with 105 additions and 4 deletions

View file

@ -67,6 +67,7 @@ function initializePDFJS(callback) {
'pdfjs-test/unit/network_spec',
'pdfjs-test/unit/network_utils_spec',
'pdfjs-test/unit/parser_spec',
'pdfjs-test/unit/pdf_find_controller_spec',
'pdfjs-test/unit/pdf_find_utils_spec',
'pdfjs-test/unit/pdf_history_spec',
'pdfjs-test/unit/primitives_spec',