You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like objectIsStringable() in src/utils/MethodCallToStringConverter.ts can't handle null values (including I assume undefined), since it tries to do arg.hasOwnProperty("toString"); if the arg is not an Object, which will immediately fail.
The text was updated successfully, but these errors were encountered:
Example
https://stackblitz.com/edit/vitest-dev-vitest-qg1hxb?file=test%2Fbasic.test.ts
If a function call is made on a Mock which takes a null parameter, which is then verified and fails, it produces a non-useful error message.
It looks like
objectIsStringable()
insrc/utils/MethodCallToStringConverter.ts
can't handle null values (including I assumeundefined
), since it tries to doarg.hasOwnProperty("toString");
if the arg is not an Object, which will immediately fail.The text was updated successfully, but these errors were encountered: