File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -234,18 +234,22 @@ const validateFlags = async (
234234 synchronous ?: boolean ,
235235 testLevel ?: TestLevel
236236) : Promise < TestLevel > => {
237- if ( synchronous && ( suiteNames || ( classNames ?. length && classNames . length > 1 ) ) ) {
237+ if ( synchronous && ( Boolean ( suiteNames ) || ( classNames ?. length && classNames . length > 1 ) ) ) {
238238 return Promise . reject ( new Error ( messages . getMessage ( 'syncClassErr' ) ) ) ;
239239 }
240240
241- if ( ( tests || classNames || suiteNames ) && testLevel && testLevel !== 'RunSpecifiedTests' ) {
241+ if (
242+ ( Boolean ( tests ) || Boolean ( classNames ) || suiteNames ) &&
243+ testLevel &&
244+ testLevel . toString ( ) !== 'RunSpecifiedTests'
245+ ) {
242246 return Promise . reject ( new Error ( messages . getMessage ( 'testLevelErr' ) ) ) ;
243247 }
244248
245249 if ( testLevel ) {
246250 return testLevel ;
247251 }
248- if ( classNames || suiteNames || tests ) {
252+ if ( Boolean ( classNames ) || Boolean ( suiteNames ) || tests ) {
249253 return TestLevel . RunSpecifiedTests ;
250254 }
251255 return TestLevel . RunLocalTests ;
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ export class TestReporter {
6464 }
6565
6666 try {
67- if ( result . summary && result . summary . outcome === ApexTestRunResultStatus . Failed ) {
67+ if ( result . summary && result . summary . outcome === ApexTestRunResultStatus . Failed . toString ( ) ) {
6868 process . exitCode = FAILURE_EXIT_CODE ;
6969 }
7070 switch ( options [ 'result-format' ] ) {
You can’t perform that action at this time.
0 commit comments