Skip to content

Commit f95d164

Browse files
test(config): drop the matcherless expect.soft in the pending-secret reset case
`expect.soft([...])` with an array argument and no matcher records nothing: a soft assertion is recorded only when a matcher runs on it. The six lines at 184-189 awaited two doubles, read a delete call count, built an array out of them and asserted none of it, so the case was asserting what it already asserts at lines 194-195 and the block above it read like coverage without carrying any. Control, run rather than described - this is the control a deletion of an assertion needs, since the honest claim is that nothing changes: `vitest run core/config` reads `Test Files 10 passed (10)`, `Tests 317 passed (317)` before the removal and `Test Files 10 passed (10)`, `Tests 317 passed (317)` after it, twice each, while the file's own counts move from 175 assertion calls (`expect(` plus `expect.soft(`) to 174 and stay flat at 66 `it()` declarations (a `expect(`-only count stays at 174 before and after, because the deleted call was `expect.soft(` and that pattern does not match it; the `expect.soft(` occurrences go 1 to 0). One assertion less, same outcome set, same case count. `prettier --check` exit 0, `eslint --max-warnings=0 --no-warn-ignored` exit 0, `tsc -p . --noEmit` exit 0, src/eslint-suppressions.json untouched. Test-only: `__tests__` is an excluded path segment at scripts/stryker-diff.mjs:85, so this adds nothing to the mutation bucket. The same dead call was copied onto every branch carrying these cases (vps2/n2-viewstates-durability at its line 181, vps2/n3-buffer-core at 184, and the vps2/n4-values-reset copy). This removes it where the review row lives, and the two forward merges carry it on. The n2 copy is left alone because that head is final for the evening and its merge owner has been asked not to merge that branch twice; the n4 copy will arrive with the merge rather than being patched separately. Review row answered: #2235 ContextProxy.spec.ts:188 (tail 6z_5oV).
1 parent 48e9bcb commit f95d164

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

‎src/core/config/__tests__/ContextProxy.spec.ts‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,12 +181,6 @@ describe("ContextProxy", () => {
181181
setTimeout(settle, 0)
182182
await proxy.resetAllState()
183183
await pending
184-
expect.soft([
185-
await mockSecrets.get("apiKey"),
186-
proxy.getSecret("apiKey"),
187-
mockSecrets.delete.mock.calls.length,
188-
])
189-
190184
// The pending store is held open on a double that only puts the value into storage
191185
// when it settles, so the ordering is observable: the reset must wait for the write to
192186
// settle and then delete the keys, so neither the cache nor the durable copy keeps the

0 commit comments

Comments
 (0)