I'm porting Jest tests to Vitest.
These tests use matchers from jest-extended
like expect(val).toBeString()
.
I tried to put import "jest-extended"
in the test file, but the result is the error: Error: Invalid Chai property: toBeString
.
I tried also to put in vite.config.ts
:
test: {
environment: "happy-dom",
globals: true,
reporters: ["default", "html"],
setupFiles: [
"node_modules/jest-extended/dist/index.js",
]
}
without change.
Even tried to use the vitest-extended
package but also no change.
Any suggestion?