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
After #1197, Any failed test which contains bson.ObjectId does not display message properly.
FAIL test/basic.test.ts [ test/basic.test.ts ]
TypeError: Cannot assign to read only property 'generate' of object '[object Object]'
I tried to attach debugger and found out error obove occurs while creating message to display. clone() tries to copy static method, ObjectId.prototype.generate(), from val and fails to paste it on out.
Describe the bug
After #1197, Any failed test which contains
bson.ObjectId
does not display message properly.I tried to attach debugger and found out error obove occurs while creating message to display.
clone()
tries to copy static method,ObjectId.prototype.generate()
, fromval
and fails to paste it onout
.vitest/packages/vitest/src/utils/base.ts
Line 55 in 5ff4331
Reproduction
https://stackblitz.com/edit/vitest-dev-vitest-xnu5kw?file=test%2Fbasic.test.ts,package.json&initialPath=__vitest
System Info
System: OS: macOS 12.3.1 CPU: (10) x64 Apple M1 Pro Memory: 25.07 MB / 32.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 14.18.1 - /usr/local/bin/node Yarn: 3.1.0 - /usr/local/bin/yarn npm: 8.1.1 - /usr/local/bin/npm Browsers: Chrome: 101.0.4951.54 Safari: 15.4 npmPackages: vitest: ^0.12.0 => 0.12.0
Used Package Manager
yarn
Validations
The text was updated successfully, but these errors were encountered: