Rename annotation_layer_spec.js
to annotation_spec.js
to better describe what is actually tested, and simplify the FileAttachmentAnnotation
unit-test to avoid having to use the entire API in the test
#7951
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Every other unit-test in
annotation_spec.js
is already only testing the annotation code. Hence it seems unnecessarily convoluted to make use of the API here, when we can (fairly) simply provide the necessary data explicitly as in all the other annotation unit-test.Edit: Note how doing this will also allow us to run the annotation unit-tests on Travis!
Compare the run with this PR: https://travis-ci.org/mozilla/pdf.js/builds/191392213#L369; with a previous run: https://travis-ci.org/mozilla/pdf.js/builds/191349139#L350.