diff --git a/test/resources/documents.test.ts b/test/resources/documents.test.ts index 7cb745e..5182f52 100644 --- a/test/resources/documents.test.ts +++ b/test/resources/documents.test.ts @@ -37,6 +37,14 @@ it("uploads a document", async () => { expect(document).toEqual(getExpectedDocument(exampleDocument)); }); +it("uploads a document with location", async () => { + document = ( + await uploadDocument(applicant, "driving_licence", { + country_of_residence: "FRA" + }) + ).data; +}); + it("downloads a document", async () => { const file = await onfido.downloadDocument(document.id); diff --git a/test/test-helpers.ts b/test/test-helpers.ts index 50a1a2b..b034d06 100644 --- a/test/test-helpers.ts +++ b/test/test-helpers.ts @@ -12,6 +12,7 @@ import { FacialSimilarityPhotoReport, FileTransfer, LiveVideo, + LocationBuilder, MotionCapture, Report, WatchlistMonitorReportNameEnum, @@ -90,11 +91,12 @@ export async function cleanUpApplicants() { export async function uploadDocument( applicant: Applicant, - documentType = "driving_licence" + documentType = "driving_licence", + location?: LocationBuilder ) { let fileTransfer = new FileTransfer("test/media/sample_driving_licence.png"); - return onfido.uploadDocument(documentType, applicant.id, fileTransfer); + return onfido.uploadDocument(documentType, applicant.id, fileTransfer, undefined, undefined, undefined, undefined, location); } export async function uploadLivePhoto(