Hazyzh / jest-html-reporters

🌈 Reporter for jest test framework. 🌈
https://hazyzh.github.io/report.html
MIT License
522 stars 100 forks source link

info not shown when context is set typescript #277

Closed bughaver closed 11 months ago

bughaver commented 1 year ago

Describe the bug info button not showing when context is set

To Reproduce

    const expectedOutput = {
      firstName: 'john',
      lastName: 'doe',
    };

    await addMsg({ context: 'expected output', message: JSON.stringify(expectedOutput, null, 2) });

Expected behavior addMsg output to be shown with context string of what the message is.

Screenshots image

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

Hazyzh commented 11 months ago

do not set the global context, we are default using jest runtime global this variable to got test file path and test suit name. just add any thing you need to the message string.