1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Merge pull request #14044 from calixteman/bug1719148

Annotations - Avoid empty value in text field when storage contains something for it (bug 1719148)
This commit is contained in:
Jonas Jenwald 2021-09-18 16:31:45 +02:00 committed by GitHub
commit 20eb6ca2ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 1 deletions

View file

@ -35,6 +35,24 @@ describe("AnnotationStorage", function () {
}).value;
expect(value).toEqual("hello world");
});
it("should get set values and default ones in the annotation storage", function () {
const annotationStorage = new AnnotationStorage();
annotationStorage.setValue("123A", {
value: "hello world",
hello: "world",
});
const result = annotationStorage.getValue("123A", {
value: "an other string",
world: "hello",
});
expect(result).toEqual({
value: "hello world",
hello: "world",
world: "hello",
});
});
});
describe("SetValue", function () {