Skip to content

Commit

Permalink
✅ [placeholder-pdfkit] Remove a duplicate test
Browse files Browse the repository at this point in the history
  • Loading branch information
vbuch committed Nov 13, 2023
1 parent 2e66d53 commit ae879b6
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions packages/placeholder-pdfkit010/src/pdfkitAddPlaceholder.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,29 +36,6 @@ describe(pdfkitAddPlaceholder, () => {
it('placeholder contains reason, contactInfo, name, location', () => {
const {pdf} = createPdfkitDocument();

const refs = pdfkitAddPlaceholder({
pdf,
pdfBuffer: Buffer.from([pdf]),
reason: 'test reason',
...defaults,
});
expect(Object.keys(refs)).toEqual(expect.arrayContaining([
'signature',
'form',
'widget',
]));
expect(pdf.page.dictionary.data.Annots).toHaveLength(1);
expect(pdf.page.dictionary.data.Annots[0].data.Subtype).toEqual('Widget');
const widgetData = pdf.page.dictionary.data.Annots[0].data.V.data;
expect(PDFObject.convert(widgetData.Reason)).toEqual('(test reason)');
expect(PDFObject.convert(widgetData.ContactInfo)).toEqual('([email protected])');
expect(PDFObject.convert(widgetData.Name)).toEqual('(test name)');
expect(PDFObject.convert(widgetData.Location)).toEqual('(test Location)');
});

it('placeholder contains default values for contactInfo, name, location', () => {
const {pdf} = createPdfkitDocument();

const refs = pdfkitAddPlaceholder({
...defaults,
pdf,
Expand Down

0 comments on commit ae879b6

Please sign in to comment.