Version
System: OS X
browsers: chrome 146
version: `"@rstest/core": "^0.9.6",`
Details
link this document:
https://rstest.rs/zh/api/runtime-api/rstest/mock-modules#%E4%BD%BF%E7%94%A8--spy-true--%E9%80%89%E9%A1%B9
code that:
rs.mock('../src/validate', { spy: true });
error tips:
对象字面量只能指定已知属性,并且“spy”不在类型“MockFactory”中。
open source code, have‘vt spy defined:
mock<T = unknown>(moduleName: string | Promise<T>, moduleFactory?: MockFactory<T>): void;
Reproduce link
https://github.com/cgfeel/rstest-stackblitz-example/blob/main/test/index.test.ts#L4
Reproduce Steps
- git clone git@github.com:cgfeel/rstest-stackblitz-example.git
- pnpm install
- open source code
Version
System: OS X browsers: chrome 146 version: `"@rstest/core": "^0.9.6",`Details
link this document:
https://rstest.rs/zh/api/runtime-api/rstest/mock-modules#%E4%BD%BF%E7%94%A8--spy-true--%E9%80%89%E9%A1%B9
code that:
error tips:
open source code, have‘vt
spydefined:Reproduce link
https://github.com/cgfeel/rstest-stackblitz-example/blob/main/test/index.test.ts#L4
Reproduce Steps