@@ -935,9 +935,9 @@ describe("BundlePusher01", () => {
935935 } ) ;
936936
937937 await runPushTestWithError ( "__tests__/__resources__/ExampleBundle01" , false ,
938- "A problem occurred attempting to run 'export PATH=\"$PATH:/usr/lpp/IBM/cnj/v8r0/IBM/node-latest-os390-s390x/bin\" " +
939- " && npm install' in remote directory '/u/ThisDoesNotExist/12345678'. " +
940- " Problem is: The output from the remote command implied that an error occurred, return code 1.") ;
938+ "A problem occurred attempting to run 'export PATH=\"$PATH:/usr/lpp/IBM/cnj/v8r0/IBM/node-latest-os390-s390x/bin\"" +
939+ " && export _BPXK_AUTOCVT=ON && npm install' in remote directory '/u/ThisDoesNotExist/12345678'." +
940+ " Problem is: The output from the remote command implied that an error occurred, return code 1.") ;
941941
942942 expect ( consoleText ) . toContain ( "Injected stdout error message" ) ;
943943 expect ( zosMFSpy ) . toHaveBeenCalledTimes ( 1 ) ;
@@ -968,9 +968,9 @@ describe("BundlePusher01", () => {
968968 } ) ;
969969
970970 await runPushTestWithError ( "__tests__/__resources__/ExampleBundle01" , false ,
971- "A problem occurred attempting to run 'export PATH=\"$PATH:/usr/lpp/IBM/cnj/v8r0/IBM/node-latest-os390-s390x/bin\" " +
972- " && npm install' in remote directory '/u/ThisDoesNotExist/12345678'. " +
973- " Problem is: The output from the remote command implied that an error occurred, return code 1.") ;
971+ "A problem occurred attempting to run 'export PATH=\"$PATH:/usr/lpp/IBM/cnj/v8r0/IBM/node-latest-os390-s390x/bin\"" +
972+ " && export _BPXK_AUTOCVT=ON && npm install' in remote directory '/u/ThisDoesNotExist/12345678'." +
973+ " Problem is: The output from the remote command implied that an error occurred, return code 1.") ;
974974
975975 expect ( consoleText ) . toContain ( "Injected FSUM7351 not found message" ) ;
976976 expect ( zosMFSpy ) . toHaveBeenCalledTimes ( 1 ) ;
@@ -1001,9 +1001,9 @@ describe("BundlePusher01", () => {
10011001 } ) ;
10021002
10031003 await runPushTestWithError ( "__tests__/__resources__/ExampleBundle01" , false ,
1004- "A problem occurred attempting to run 'export PATH=\"$PATH:/usr/lpp/IBM/cnj/v8r0/IBM/node-latest-os390-s390x/bin\" " +
1005- " && npm install' in remote directory '/u/ThisDoesNotExist/12345678'. " +
1006- " Problem is: The output from the remote command implied that an error occurred, return code 1.") ;
1004+ "A problem occurred attempting to run 'export PATH=\"$PATH:/usr/lpp/IBM/cnj/v8r0/IBM/node-latest-os390-s390x/bin\"" +
1005+ " && export _BPXK_AUTOCVT=ON && npm install' in remote directory '/u/ThisDoesNotExist/12345678'." +
1006+ " Problem is: The output from the remote command implied that an error occurred, return code 1.") ;
10071007
10081008 expect ( consoleText ) . toContain ( "Injected npm ERR! Exit status 1 message" ) ;
10091009 expect ( zosMFSpy ) . toHaveBeenCalledTimes ( 1 ) ;
@@ -1080,6 +1080,16 @@ describe("BundlePusher01", () => {
10801080 expect ( readdirSpy ) . toHaveBeenCalledTimes ( 1 ) ;
10811081 expect ( lstatSpy ) . toHaveBeenCalledTimes ( 1 ) ;
10821082 } ) ;
1083+ it ( "should set up auto conversion before running npm install" , async ( ) => {
1084+ readdirSpy . mockImplementation ( ( data : string ) => {
1085+ return [ "package.json" ] ;
1086+ } ) ;
1087+ await runPushTest ( "__tests__/__resources__/ExampleBundle01" , false , "PUSH operation completed" ) ;
1088+ expect ( shellSpy ) . toBeCalledWith ( expect . anything ( ) ,
1089+ expect . stringContaining ( "_BPXK_AUTOCVT=ON" ) ,
1090+ expect . anything ( ) ,
1091+ expect . anything ( ) ) ;
1092+ } ) ;
10831093 it ( "should run npm install for each package.json" , async ( ) => {
10841094 const parms = getCommonParmsForPushTests ( ) ;
10851095 parms . arguments . verbose = true ;
0 commit comments