Skip to content

TRX reporter is not reporting the hook failures #21

@goelankit

Description

@goelankit

The TRX reporter is not handling the hook failures correctly.

The condition here in "suite end" handler seems to be incorrect.
runner.on('suite end', (suite) => {
if (failedHook && failedHook.parent === suite) {

This is what I am seeing in debug console.

failedHook.parent
{root: false, title: '#test1()'}
root:false
title:'#test1()'
proto:Object

suite
{_bail: false, root: false, title: '#test1()', fullTitle: ƒ}
_bail:false
fullTitle:() => value
root:false
title:'#test1()'
proto:Object

failedHook.parent === suite
false

Since the failedHook.parent is not equal to suite, hook failures doesn't get reported in the trx reports.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions