happy-dom icon indicating copy to clipboard operation
happy-dom copied to clipboard

Vitest - Failure cause not provided for 'XYZ'

Open MircoSteyer opened this issue 1 year ago • 1 comments

Describe the bug Failing tests with Vitest do not provide the failure cause. Instead, the following error message is displayed when starting the test via Webstorm: Failure cause not provided for 'XYZ'

When starting the test over the terminal, the error is the following: TypeError: string "base64" is not a function

To Reproduce Steps to reproduce the behavior:

  1. Write a Test with vitest with an expect statement that will fail
  2. Run the test either via CLI or Webstorm IDE
  3. See error log

Expected behavior Executing a test via CLI or IDE should both lead to the Vitest expectation failure to be displayed.

Screenshots image

image

Additional context This issue first appears in Version "13.3.0" of "@happy-dom/global-registrator" and could be replicated up to and including "13.6.0". This issue does not occur in Verions "13.2.2" and earlier.

MircoSteyer avatar Feb 02 '24 12:02 MircoSteyer

The error therefore likely occurs due to a change here: https://github.com/capricorn86/happy-dom/compare/v13.2.2...v13.3.0?diff=unified&w=

MircoSteyer avatar Feb 26 '24 08:02 MircoSteyer