refactor: replace deprecated toMatchTypeOf#114
Conversation
🚨 Preview Deployment Blocked - Security ProtectionYour pull request was blocked from triggering preview deployments Why was this blocked?
How to resolve this:Option 1: Get Collaborator Access (Recommended) Option 2: Request Permission Override For Repository Administrators:To disable this security check ( This security measure protects against malicious code execution in preview deployments. Only trusted collaborators should have the ability to trigger deployments. 🛡️ Learn more about this security featureThis protection prevents unauthorized users from:
Preview deployments are powerful but require trust. Only users with repository write access can trigger them. |
While checking out the tests I stumbled over the deprecation warning for
toMatchTypeOf. The docs don't say anything about that so I dug a bit deeper and found out that the method was deprecated quite a while ago in v1.2.0.The docs have only been updated recently: vitest-dev/vitest#8387, but that change has not been released yet and can only be seen in the docs for v4: https://main.vitest.dev/api/expect-typeof.html#tomatchtypeof.
I also tried if I can replace any of the usages with
toMatchObjectType, but that gave me the error that it only works on object types. I'm guessing that the type ofdatamight be too complex for that.