@@ -935,9 +935,9 @@ describe("BundlePusher01", () => {
935
935
} ) ;
936
936
937
937
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.") ;
941
941
942
942
expect ( consoleText ) . toContain ( "Injected stdout error message" ) ;
943
943
expect ( zosMFSpy ) . toHaveBeenCalledTimes ( 1 ) ;
@@ -968,9 +968,9 @@ describe("BundlePusher01", () => {
968
968
} ) ;
969
969
970
970
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.") ;
974
974
975
975
expect ( consoleText ) . toContain ( "Injected FSUM7351 not found message" ) ;
976
976
expect ( zosMFSpy ) . toHaveBeenCalledTimes ( 1 ) ;
@@ -1001,9 +1001,9 @@ describe("BundlePusher01", () => {
1001
1001
} ) ;
1002
1002
1003
1003
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.") ;
1007
1007
1008
1008
expect ( consoleText ) . toContain ( "Injected npm ERR! Exit status 1 message" ) ;
1009
1009
expect ( zosMFSpy ) . toHaveBeenCalledTimes ( 1 ) ;
@@ -1080,6 +1080,16 @@ describe("BundlePusher01", () => {
1080
1080
expect ( readdirSpy ) . toHaveBeenCalledTimes ( 1 ) ;
1081
1081
expect ( lstatSpy ) . toHaveBeenCalledTimes ( 1 ) ;
1082
1082
} ) ;
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
+ } ) ;
1083
1093
it ( "should run npm install for each package.json" , async ( ) => {
1084
1094
const parms = getCommonParmsForPushTests ( ) ;
1085
1095
parms . arguments . verbose = true ;
0 commit comments