Conversation
66b27ab to
db8ac8d
Compare
| // eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
| getAuthStatus: fn((machineState: InsertedSmartCardAuthMachineState) => | ||
| Promise.resolve(InsertedSmartCardAuthTypes.DEFAULT_AUTH_STATUS) |
There was a problem hiding this comment.
The upgrade created a very strange test failure. In https://github.com/votingworks/vxsuite/blob/main/apps/mark/backend/src/app.ui_strings.test.ts, the last test started failing because, after the upgrade, the nested mock resets in the UI strings test harnesses were resetting. There are some breaking changes around spies, but I don't think any of them correspond exactly to what I was seeing. The reset will reset mocks to their original interpretation, which can be passed as an argument to vi.fn, which is what I do here. But there may be a larger issue with nested test harnesses resetting mocks in their calling test suites.
|
|
||
| vi.setConfig({ | ||
| testTimeout: 30000, | ||
| testTimeout: 60_000, |
There was a problem hiding this comment.
Maybe there was a perf hit as part of the upgrade, because I had to bump these timeouts substantially to make these pass.
There was a problem hiding this comment.
I remember something to this effect with the upgrade I did as well. I see there are others having issues as well, and one of the sources of the performance regression was fixed in vitest-dev/vitest#7291. However, that was fixed in v3.0.3. Whether there are other perf issues lurking, I don't know.
| lines: -200, | ||
| branches: -119, |
There was a problem hiding this comment.
The actual number of uncovered lines varies from run to run, and this is a number which has passed so far 🤷
|
|
||
| vi.setConfig({ | ||
| testTimeout: 30000, | ||
| testTimeout: 60_000, |
There was a problem hiding this comment.
I remember something to this effect with the upgrade I did as well. I see there are others having issues as well, and one of the sources of the performance regression was fixed in vitest-dev/vitest#7291. However, that was fixed in v3.0.3. Whether there are other perf issues lurking, I don't know.
Overview
I thought to do a little mindless code contribution but actually this turned out to be a headache. I started with
libs/backend, but because all the backends import test harnesses fromlibs/backend, conflicting package versions led me to upgrade all the backends. But because most of the backends import test utilities fromlibs/image-utils, I had to upgrade those and then other backends that import them.In upgraded libraries, I've set the negative coverage thresholds to their maximum. The exception is
pollbook/backend, which appears to have variable code coverage on every run, which seems bad, but is outside the scope of this PR.