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
@ -2281,7 +2281,7 @@ describe("annotation", function () {
|
|||||||
{ ref: buttonWidgetRef, data: buttonWidgetDict },
|
{ ref: buttonWidgetRef, data: buttonWidgetDict },
|
||||||
]);
|
]);
|
||||||
const task = new WorkerTask("test print");
|
const task = new WorkerTask("test print");
|
||||||
partialEvaluator.options = { ignoreErrors: true };
|
const checkboxEvaluator = partialEvaluator.clone({ ignoreErrors: true });
|
||||||
|
|
||||||
const annotation = await AnnotationFactory.create(
|
const annotation = await AnnotationFactory.create(
|
||||||
xref,
|
xref,
|
||||||
@ -2293,7 +2293,7 @@ describe("annotation", function () {
|
|||||||
annotationStorage.set(annotation.data.id, { value: true });
|
annotationStorage.set(annotation.data.id, { value: true });
|
||||||
|
|
||||||
const operatorList = await annotation.getOperatorList(
|
const operatorList = await annotation.getOperatorList(
|
||||||
partialEvaluator,
|
checkboxEvaluator,
|
||||||
task,
|
task,
|
||||||
false,
|
false,
|
||||||
annotationStorage
|
annotationStorage
|
||||||
|
Loading…
x
Reference in New Issue
Block a user