test(career): F2b — drive real closeBook() in in-flight-discard test (Creed closer)

The previous test for closeBook() invalidating in-flight requests bumped
_ppBookGen directly via setBookGen instead of calling the production closeBook().
Deleting ++_ppBookGen from closeBook() left the test green — decoration.

Fix: expose closeBook via the __careerPassportTest seam and call it directly
in the test. Mutation proof (run before commit):
  - delete ++_ppBookGen from closeBook() → 1 fail (test RED)  ✓
  - restore → 14/14 pass (GREEN)  ✓

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H2bM5jSbMskpdxm2CmuQVj
This commit is contained in:
byrongamatos
2026-09-03 18:34:02 +02:00
co-authored by Claude Sonnet 4.6
parent 1033de87ce
commit 2ae46fe754
2 changed files with 12 additions and 11 deletions
+1 -1
View File
@@ -1721,7 +1721,7 @@
getBookGen() { return _ppBookGen; },
setBookGen(g) { _ppBookGen = g; },
getProposal() { return _ppGigProposal; },
bookGig,
bookGig, closeBook,
};
if (document.readyState === 'loading') {