Record<string, T> hid a missing key as defined
Record<string, T> types every key as present, so a typo compiled and getChain returned undefined. Thirteen tests failed from one missing key.
Read the entry →6 entries tagged “testing”.
Record<string, T> types every key as present, so a typo compiled and getChain returned undefined. Thirteen tests failed from one missing key.
Read the entry →Vitest 3 test fails with vi.mocked(...).mockResolvedValue is not a function after restoreAllMocks. Here's how to fix it in one line.
Read the entry →Bumping Vitest from 3 to 4 turned my git-proxy CI red while local stayed green. Stale node_modules, broken class mocks, and port clashes. Here's how I fixed each.
Read the entry →A Vitest test using expect().toThrow() let a JSON.parse SyntaxError escape and fail the run instead of catching it. Here's why, and the fix.
Read the entry →How to fix all the ESM mocking errors when moving GitProxy's test suite from Mocha, Chai, Sinon and proxyquire to Vitest + TypeScript
Read the entry →A git-proxy test failed with 'undefined' is not valid JSON after moving from proxyquire to Vitest. Let's look at the cause and how to fix.
Read the entry →