mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 08:08:07 +02:00
Don't change options of the globally used PartialEvaluator
in the "should render checkbox with fallback font for printing" unit-test
Given that the same `PartialEvaluator`-instance is used for a lot of these unit-tests, manually changing the options in any one test-case could lead to intermittently failing unit-tests since they're run in a random order. To fix this, we simply have to use the existing method to clone the `PartialEvaluator`-instance but with the custom options.
This commit is contained in:
parent
e3bde56311
commit
af78ba64bd
1 changed files with 2 additions and 2 deletions
|
@ -2281,7 +2281,7 @@ describe("annotation", function () {
|
|||
{ ref: buttonWidgetRef, data: buttonWidgetDict },
|
||||
]);
|
||||
const task = new WorkerTask("test print");
|
||||
partialEvaluator.options = { ignoreErrors: true };
|
||||
const checkboxEvaluator = partialEvaluator.clone({ ignoreErrors: true });
|
||||
|
||||
const annotation = await AnnotationFactory.create(
|
||||
xref,
|
||||
|
@ -2293,7 +2293,7 @@ describe("annotation", function () {
|
|||
annotationStorage.set(annotation.data.id, { value: true });
|
||||
|
||||
const operatorList = await annotation.getOperatorList(
|
||||
partialEvaluator,
|
||||
checkboxEvaluator,
|
||||
task,
|
||||
false,
|
||||
annotationStorage
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue