@@ -47,6 +47,11 @@ describe("MindeeV2 - Crop Response", async () => {
4747 assert . strictEqual ( polygon [ 2 ] [ 1 ] , 0.947 ) ;
4848 assert . strictEqual ( polygon [ 3 ] [ 0 ] , 0.15 ) ;
4949 assert . strictEqual ( polygon [ 3 ] [ 1 ] , 0.947 ) ;
50+
51+ const rstString = await fs . readFile (
52+ path . join ( V2_PRODUCT_PATH , "crop" , "crop_single.rst" ) , "utf8"
53+ ) ;
54+ assert . strictEqual ( response . inference . toString ( ) , rstString ) ;
5055 } ) ;
5156
5257 it ( "should load multiple results" , async ( ) => {
@@ -101,19 +106,10 @@ describe("MindeeV2 - Crop Response", async () => {
101106 assert . strictEqual ( secondPolygon [ 2 ] [ 1 ] , 0.97 ) ;
102107 assert . strictEqual ( secondPolygon [ 3 ] [ 0 ] , 0.547 ) ;
103108 assert . strictEqual ( secondPolygon [ 3 ] [ 1 ] , 0.97 ) ;
104- } ) ;
105109
106- describe ( "RST Display" , async ( ) => {
107- it ( "to be properly exposed" , async ( ) => {
108- const response = await loadV2Response (
109- crop . CropResponse ,
110- path . join ( V2_PRODUCT_PATH , "crop" , "crop_single.json" )
111- ) ;
112- const rstString = await fs . readFile (
113- path . join ( V2_PRODUCT_PATH , "crop" , "crop_single.rst" ) , "utf8"
114- ) ;
115- assert . notStrictEqual ( response . inference , null ) ;
116- assert . strictEqual ( response . inference . toString ( ) , rstString ) ;
117- } ) ;
110+ const rstString = await fs . readFile (
111+ path . join ( V2_PRODUCT_PATH , "crop" , "crop_multiple.rst" ) , "utf8"
112+ ) ;
113+ assert . strictEqual ( response . inference . toString ( ) , rstString ) ;
118114 } ) ;
119115} ) ;
0 commit comments