@@ -1996,36 +1996,35 @@ describe("Utils", () => {
19961996 const result = queryUtils . resultToBase64 ( png ) ;
19971997 assert . strictEqual ( result , undefined ) ;
19981998 } ) ;
1999- it ( "should return undefined for undefined for bad signature" , ( ) => {
1999+ it ( "should return undefined for bad signature" , ( ) => {
20002000 const result = queryUtils . resultToBase64 ( [
20012001 ...png . map ( ( v ) => parseInt ( v , 16 ) + 1 ) ,
2002- ,
20032002 ...img ,
20042003 ] ) ;
20052004 assert . strictEqual ( result , undefined ) ;
20062005 } ) ;
20072006 it ( "should return base64 for minimum img str" , ( ) => {
20082007 const result = queryUtils . resultToBase64 ( [ ...png , ...img ] ) ;
2009- assert . ok ( result . startsWith ( "data:image/png;base64" ) ) ;
2008+ assert . ok ( result ) ;
20102009 } ) ;
20112010 it ( "should return base64 for minimum img num" , ( ) => {
20122011 const result = queryUtils . resultToBase64 ( [
20132012 ...png . map ( ( v ) => parseInt ( v , 16 ) ) ,
20142013 ...img . map ( ( v ) => parseInt ( v , 16 ) ) ,
20152014 ] ) ;
2016- assert . ok ( result . startsWith ( "data:image/png;base64" ) ) ;
2015+ assert . ok ( result ) ;
20172016 } ) ;
20182017 it ( "should return base64 for minimum img str for structuredText" , ( ) => {
20192018 const result = queryUtils . resultToBase64 ( {
20202019 columns : { values : [ ...png , ...img ] } ,
20212020 } ) ;
2022- assert . ok ( result . startsWith ( "data:image/png;base64" ) ) ;
2021+ assert . ok ( result ) ;
20232022 } ) ;
20242023 it ( "should return base64 for minimum img str for structuredText v2" , ( ) => {
20252024 const result = queryUtils . resultToBase64 ( {
20262025 columns : [ { values : [ ...png , ...img ] } ] ,
20272026 } ) ;
2028- assert . ok ( result . startsWith ( "data:image/png;base64" ) ) ;
2027+ assert . ok ( result ) ;
20292028 } ) ;
20302029 it ( "should return undefined for bogus structuredText" , ( ) => {
20312030 const result = queryUtils . resultToBase64 ( {
@@ -2039,5 +2038,12 @@ describe("Utils", () => {
20392038 } ) ;
20402039 assert . strictEqual ( result , undefined ) ;
20412040 } ) ;
2041+ it ( "should return base64 from windows q server" , ( ) => {
2042+ const result = queryUtils . resultToBase64 ( [
2043+ ...png . map ( ( v ) => `${ v } \r` ) ,
2044+ ...img . map ( ( v ) => `${ v } \r` ) ,
2045+ ] ) ;
2046+ assert . ok ( result ) ;
2047+ } ) ;
20422048 } ) ;
20432049} ) ;
0 commit comments