-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There is an issue with types for test file #124
Comments
This issue was caused by Vitest in vitest-dev/vitest#5142, I have submitted a PR to fix this on Vitest's end. I addressed it in this repo on #118, but I might have to put up a separate PR just for the fix. In the meantime you can do this: const it = test<LocalTestContext>
describe('counter reducer', () => {
beforeEach<LocalTestContext>((context) => {
const initialState: CounterSliceState = {
value: 3,
status: 'idle',
}
const store = makeStore({ counter: initialState })
context.store = store
}) |
in all honesty i'm not sure of the benefit of using the context object vs just having a let variable that gets reassigned 😕 |
@EskiMojo14 We can do that too, we can also use a fixture, I only suggested it because it seemed to fix the problem with the least number of lines changed. |
looks like vitest-dev/vitest#5142 was merged so hopefully with the next release of Vitest, this will not be an issue anymore. |
npm run type-check is giving errors
The text was updated successfully, but these errors were encountered: