File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
packages/wdio-allure-reporter Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -283,8 +283,8 @@ class AllureReporter extends WDIOReporter {
283283 } )
284284 }
285285 }
286- } else if ( ! this . options . disableMochaHooks ) this . onTestPass ( )
287- }
286+ }
287+ } else if ( ! this . options . disableMochaHooks ) this . onTestPass ( )
288288 }
289289
290290 addLabel ( { name, value } ) {
Original file line number Diff line number Diff line change @@ -541,21 +541,21 @@ describe('hooks handling default', () => {
541541 expect ( startCase ) . toHaveBeenCalledTimes ( 1 )
542542 } )
543543
544- it ( 'should not keep passed hooks if there are no steps (before/after)' , ( ) => {
544+ it ( 'should keep passed hooks if there are no steps (before/after)' , ( ) => {
545545 const testcases = [ 1 ]
546546 reporter . allure = allureInstance ( { suite : { testcases } , test : { steps : [ ] } } )
547547 reporter . onHookEnd ( { title : '"before all" hook' , parent : 'foo' } )
548548
549- expect ( endCase ) . toHaveBeenCalledTimes ( 0 )
549+ expect ( endCase ) . toHaveBeenCalledTimes ( 1 )
550550 expect ( testcases ) . toHaveLength ( 1 )
551551 } )
552552
553- it ( 'should not keep passed hooks if there are some steps' , ( ) => {
553+ it ( 'should keep passed hooks if there are some steps' , ( ) => {
554554 const testcases = [ 1 ]
555555 reporter . allure = allureInstance ( { suite : { testcases } , test : { steps : [ 1 ] } } )
556556 reporter . onHookEnd ( { title : 'foo' , parent : 'bar' } )
557557
558- expect ( endCase ) . toHaveBeenCalledTimes ( 0 )
558+ expect ( endCase ) . toHaveBeenCalledTimes ( 1 )
559559 expect ( testcases ) . toHaveLength ( 1 )
560560 } )
561561} )
You can’t perform that action at this time.
0 commit comments