classes
1 trace
- <anonymous> is not a constructor — Vitest 4 class mocks need function/class implementations, not arrow functionsAfter upgrading to Vitest 4, code under test that runs new SomeClass() on a mocked class throws <anonymous> is not a constructor (or <Name> is not a constructor). Fix: Use a function or a class as the implementation:…