happy-dom
happy-dom copied to clipboard
Vitest - Failure cause not provided for 'XYZ'
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:
- Write a Test with vitest with an expect statement that will fail
- Run the test either via CLI or Webstorm IDE
- See error log
Expected behavior Executing a test via CLI or IDE should both lead to the Vitest expectation failure to be displayed.
Screenshots
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.
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=