@@ -2,21 +2,21 @@ import { promises as fs } from "fs";
22import * as path from "path" ;
33import { expect } from "chai" ;
44import { PredictResponse } from "../../src" ;
5- import { CustomV1 , InvoiceV4 , ReceiptV4 } from "../../src/product" ;
5+ import { CustomV1 , InvoiceV4 , ReceiptV5 } from "../../src/product" ;
66import { LicensePlateV1 } from "../../src/product/eu" ;
77
88const dataPath = {
9- receiptV4 : "tests/data/products/expense_receipts/response_v4 /complete.json" ,
9+ receiptV5 : "tests/data/products/expense_receipts/response_v5 /complete.json" ,
1010 invoiceV4 : "tests/data/products/invoices/response_v4/complete.json" ,
1111 licensePlateV1 : "tests/data/products/license_plates/response_v1/complete.json" ,
1212 customV1 : "tests/data/products/custom/response_v1/complete.json" ,
1313} ;
1414
1515describe ( "Synchronous API predict response" , ( ) => {
1616 it ( "should build a Receipt response" , async ( ) => {
17- const jsonData = await fs . readFile ( path . resolve ( dataPath . receiptV4 ) ) ;
17+ const jsonData = await fs . readFile ( path . resolve ( dataPath . receiptV5 ) ) ;
1818 const httpResponse = JSON . parse ( jsonData . toString ( ) ) ;
19- const response = new PredictResponse ( ReceiptV4 , httpResponse ) ;
19+ const response = new PredictResponse ( ReceiptV5 , httpResponse ) ;
2020 expect ( response . document . inference . prediction ) . to . not . be . undefined ;
2121 expect ( response . document . inference . pages . length ) . to . be . equals ( 1 ) ;
2222 expect ( response . document . nPages ) . to . be . equals ( 1 ) ;
0 commit comments