Skip to content

Commit

Permalink
✅ update test to use correct API for existing form
Browse files Browse the repository at this point in the history
  • Loading branch information
dhensby authored and vbuch committed Nov 28, 2023
1 parent 7fbc856 commit 3b82753
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions packages/placeholder-pdfkit/src/pdfkitAddPlaceholder.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {SIG_FLAGS, SUBFILTER_ADOBE_PKCS7_DETACHED, SUBFILTER_ETSI_CADES_DETACHED} from '@signpdf/utils';
import {SUBFILTER_ADOBE_PKCS7_DETACHED, SUBFILTER_ETSI_CADES_DETACHED} from '@signpdf/utils';
import {createPdfkitDocument} from '@signpdf/internal-utils';
import PDFDocument from 'pdfkit';
import {pdfkitAddPlaceholder} from './pdfkitAddPlaceholder';
Expand Down Expand Up @@ -125,13 +125,7 @@ describe(pdfkitAddPlaceholder, () => {

it('adds placeholder to PDFKit document when AcroForm is already there', () => {
const {pdf} = createPdfkitDocument(PDFDocument, {});
const form = pdf.ref({
Type: 'AcroForm',
SigFlags: SIG_FLAGS.SIGNATURES_EXIST | SIG_FLAGS.APPEND_ONLY,
Fields: [],
});
// eslint-disable-next-line no-underscore-dangle
pdf._root.data.AcroForm = form;
pdf.initForm();

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

0 comments on commit 3b82753

Please sign in to comment.