@@ -2,7 +2,7 @@ import nock from "nock";
22import * as path from "path" ;
33import { expect } from "chai" ;
44import * as mindee from "../../../src" ;
5- import { RESOURCE_PATH } from "../../index" ;
5+ import { RESOURCE_PATH , V1_RESOURCE_PATH } from "../../index" ;
66
77describe ( "MindeeV1 - HTTP calls" , ( ) => {
88 before ( function ( ) {
@@ -31,7 +31,7 @@ describe("MindeeV1 - HTTP calls", () => {
3131
3232 it ( "should fail on 400 response with object" , async ( ) => {
3333 try {
34- await sendRequest ( 400 , path . join ( RESOURCE_PATH , "errors/error_400_with_object_in_detail.json" ) ) ;
34+ await sendRequest ( 400 , path . join ( V1_RESOURCE_PATH , "errors/error_400_with_object_in_detail.json" ) ) ;
3535 } catch ( error : any ) {
3636 expect ( error . name ) . to . be . equals ( "MindeeHttp400Error" ) ;
3737 expect ( error . code ) . to . be . equals ( 400 ) ;
@@ -42,7 +42,7 @@ describe("MindeeV1 - HTTP calls", () => {
4242
4343 it ( "should fail on 401 response" , async ( ) => {
4444 try {
45- await sendRequest ( 401 , path . join ( RESOURCE_PATH , "errors/error_401_no_token.json" ) ) ;
45+ await sendRequest ( 401 , path . join ( V1_RESOURCE_PATH , "errors/error_401_no_token.json" ) ) ;
4646 } catch ( error : any ) {
4747 expect ( error . name ) . to . be . equals ( "MindeeHttp401Error" ) ;
4848 expect ( error . code ) . to . be . equals ( 401 ) ;
@@ -53,7 +53,7 @@ describe("MindeeV1 - HTTP calls", () => {
5353
5454 it ( "should fail on 429 response" , async ( ) => {
5555 try {
56- await sendRequest ( 429 , path . join ( RESOURCE_PATH , "errors/error_429_too_many_requests.json" ) ) ;
56+ await sendRequest ( 429 , path . join ( V1_RESOURCE_PATH , "errors/error_429_too_many_requests.json" ) ) ;
5757 } catch ( error : any ) {
5858 expect ( error . name ) . to . be . equals ( "MindeeHttp429Error" ) ;
5959 expect ( error . code ) . to . be . equals ( 429 ) ;
@@ -63,7 +63,7 @@ describe("MindeeV1 - HTTP calls", () => {
6363 } ) ;
6464 it ( "should fail on 500 response" , async ( ) => {
6565 try {
66- await sendRequest ( 500 , path . join ( RESOURCE_PATH , "errors/error_500_inference_fail.json" ) ) ;
66+ await sendRequest ( 500 , path . join ( V1_RESOURCE_PATH , "errors/error_500_inference_fail.json" ) ) ;
6767 } catch ( error : any ) {
6868 expect ( error . name ) . to . be . equals ( "MindeeHttp500Error" ) ;
6969 expect ( error . code ) . to . be . equals ( 500 ) ;
@@ -74,7 +74,7 @@ describe("MindeeV1 - HTTP calls", () => {
7474
7575 it ( "should fail on HTML response" , async ( ) => {
7676 try {
77- await sendRequest ( 500 , path . join ( RESOURCE_PATH , "errors/error_50x.html" ) ) ;
77+ await sendRequest ( 500 , path . join ( V1_RESOURCE_PATH , "errors/error_50x.html" ) ) ;
7878 } catch ( error : any ) {
7979 expect ( error . name ) . to . be . equals ( "MindeeHttp500Error" ) ;
8080 expect ( error . code ) . to . be . equals ( 500 ) ;
0 commit comments