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:
Jonas Jenwald 2021-05-31 11:54:33 +02:00
parent e3bde56311
commit af78ba64bd

View File

@ -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