File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,28 @@ describe('apex run test', () => {
5454 '<testcase name="testGetPicturesWithResults" classname="TestPropertyController" time="'
5555 ) ;
5656 } ) ;
57+ describe ( 'start time user locale' , ( ) => {
58+ let langEnvVar : string | undefined ;
59+ before ( ( ) => {
60+ langEnvVar = process . env . LANG ;
61+ process . env . LANG = 'en-CA' ;
62+ } ) ;
63+ after ( ( ) => {
64+ process . env . LANG = langEnvVar ;
65+ } ) ;
66+ it ( 'will print junit format in user locale' , async ( ) => {
67+ // If the command returns a 0 exit code this test passes.
68+ // This test ensures this GH issue is fixed: https://github.com/forcedotcom/cli/issues/2220
69+ const result = execCmd ( 'apex:run:test --result-format junit --wait 10' , { ensureExitCode : 0 } ) . shellOutput
70+ . stdout ;
71+ expect ( result ) . to . include ( '<?xml version="1.0" encoding="UTF-8"?>' ) ;
72+ expect ( result ) . to . include ( '<testsuites>' ) ;
73+ expect ( result ) . to . include ( '<testsuite name="force.apex" timestamp="' ) ;
74+ expect ( result ) . to . include (
75+ '<testcase name="testGetPicturesWithResults" classname="TestPropertyController" time="'
76+ ) ;
77+ } ) ;
78+ } ) ;
5779 } ) ;
5880
5981 describe ( '--code-coverage' , ( ) => {
You can’t perform that action at this time.
0 commit comments