File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 11import { err , ok , ResultAsync } from 'neverthrow'
22import puppeteer from 'puppeteer-core'
33
4- import config , { aws as AwsConfig } from '../config/config'
4+ import config , { aws as AwsConfig , isTest } from '../config/config'
55import { createLoggerWithLabel } from '../config/logger'
66import {
77 PdfGenerationLambdaFailureError ,
@@ -136,6 +136,12 @@ export const generatePdfFromHtml = async (
136136 summaryHtml : string ,
137137 isUseLambdaOutput : boolean ,
138138) : Promise < Buffer > => {
139+ // Required for e2e testing, since PDF is generated during submission.
140+ if ( isTest ) {
141+ const DUMMY_PDF_CONTENT = 'TEST PDF CONTENT'
142+ return Buffer . from ( DUMMY_PDF_CONTENT )
143+ }
144+
139145 const logMeta = {
140146 action : 'generatePdfFromHtml' ,
141147 isUseLambdaOutput,
You can’t perform that action at this time.
0 commit comments